home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Mosaic / Docs / www-server-guide.txt < prev    next >
Encoding:
Text File  |  1994-09-11  |  113.2 KB  |  2,785 lines  |  [TEXT/UNIX]

  1.                           W3 SERVER SOFTWARE
  2.                                    
  3.  A W3 server, like the ftp daemon , is a program which responds to an
  4.  incoming tcp connection and provides a service to the caller.  There
  5.  are many varieties of W3 server software to serve different forms of
  6.  data.
  7.  
  8. Basic W3 servers
  9.  
  10.   CERN server             The basic W3  daemon program serves files
  11.                          already in hypertext or plain text.  This
  12.                          daemon then is used as a basis for many other
  13.                          types of server and gateways .
  14.                          
  15.   NCSA server             A server for files, written in C, public
  16.                          domain.  Runs on top of a gopher-style
  17.                          database just like "gopherd".
  18.                          
  19.   Perl server             from Marc VanHeyningen at Indiana
  20.                          University. Wriiten in perl .
  21.                          
  22.   Plexus                  Tony Sander's engversion of Marc VH's.
  23.                          
  24.   MacHTTPD                Server for the Macintosh
  25.                          
  26.   REXX for VM             A server consisting of a amall C program
  27.                          which passes control to a  server written in
  28.                          REXX.
  29.                          
  30.  Whatever server you are running, you will probably be interested in:
  31.  
  32.       Tools for information providers
  33.       
  34.       Syle Guide for Online Hypertext
  35.       
  36. Making a new server
  37.  
  38.  This daemon is often used as a basis for a more specific server for a
  39.  given application.  A server which allows a world of data to be seen
  40.  as part of the W3 universe is known as a gateway.  (Most servers
  41.  could therefore be regarded as gateways, but the term implies some
  42.  conversion or mapping between dissimilar worlds) .  For  short
  43.  tutorials with examples, see:
  44.  
  45.       Writing a server in C
  46.       
  47.       Writing a server as a script
  48.       
  49.  It is a good idea to pick the basic daemon or one of the servers in
  50.  the list as a starting point when making a new server.
  51.  
  52. Other servers and Gateways
  53.  
  54.  
  55.  
  56.  
  57. T. Berners-Lee                                                       1
  58.  
  59.                                  WWW Server Guide)        14 July 1993
  60.  
  61.  These are servers which provide data extracted from other systems.
  62.  they are built using code from the basic daemon, or scripts. See
  63.  
  64.       List of Gateways available .
  65.       
  66.                                                                 Tim BL
  67.                                                                       
  68. About documents generated from hypertext
  69.  
  70.  Paper manuals generated from hypertext are made for convenience, for
  71.  example for reading when one has no computer to turn to.  We have
  72.  tried to make the hypertext into fairly conventional paper documents,
  73.  but they may seem a little strange in some ways.
  74.  All the links have been removed. Therefore, it is worth looking at
  75.  the table of contents to see what there is in the manual.  Something
  76.  which is not explained in place may be explained in detail elsewhere.
  77.  We have tried to keep related matter together, but sometimes
  78.  necessarily you might have to check the table of contents to find it.
  79.  Please remember that these are for the most part "living documents".
  80.  That is, they are constantly changing to reflect current knowledge.
  81.  If you see a statement such as "Product xxx does not support this
  82.  feature", remember that it was the case when the document was
  83.  generated, and may not be the same now.   So if in doubt, check the
  84.  online version. Of course, the living document may be out of date
  85.  too, in which case it is helpful to mail its author.
  86.  
  87.                                                                 Tim BL
  88.                                                                       
  89.                         WWW SERVER USER GUIDE
  90.                                    
  91.  The basic WWW server allows files and directories in a file system to
  92.  be server to the world as menu trees, multimedia, and/or hypertext.
  93.  The http daemon, httpd , is a general server program which runs a w3
  94.  protocol, " HTTP ".   This is a TCP/IP based protocol running by
  95.  convention on port 80.
  96.  
  97. In this guide
  98.  
  99.   Distribution            How to get the code.
  100.                          
  101.   Compilation             The daemon is compiled in the same way as
  102.                          the library and line mode browser -- see WWW
  103.                          distributed code .
  104.                          
  105.   Installation            How to install a server under unix internet
  106.                          daemon
  107.                          
  108.   Options                 Command line options at run time
  109.                          
  110.   Rule File               The format of a rule file. By default,
  111.                          /etc/httpd.conf
  112.                          
  113.   Etiquette               Conventions you should follow to make life
  114.  
  115. T. Berners-Lee                                                       2
  116.  
  117.                                  WWW Server Guide)        14 July 1993
  118.  
  119.                          smoother
  120.                          
  121.   Debugging               If it doesn't seem to work
  122.                          
  123.   Known bugs              and improvements desired
  124.                          
  125.   Change History          change list of improvements made and bug
  126.                          fixes.
  127.                          
  128. Related documents
  129.  
  130.   HTML specification      A description of the hypertext markup
  131.                          language used for representing menus, etc
  132.                          
  133.   HTTP specification      A desription of the protocol used by the
  134.                          server.
  135.                          
  136. Status of basic WWW server
  137.  
  138.  A basic fast information server for files.
  139.  
  140.   Author                  TBL
  141.                          
  142.   Status:                 Version  2 available by anonymous FTP, with
  143.                          no index search but file access, name mapping
  144.                          and security filter, ability to act as
  145.                          gateway for anything in the WWW library's
  146.                          repertoire, including WAIS.
  147.                          
  148.   Plans:                  A version which will allow general unix
  149.                          users to set up an index search daemon. As
  150.                          index search tools are not generally
  151.                          available, we may use the NeXT digital
  152.                          Librarian or WAIS as an basis.
  153.                          
  154.   Platforms               Unix, VMS, VM/CMS (VM/XA).
  155.                          
  156.   Next Milestone:         Run shell scripts to implement virtual
  157.                          documents and searches.
  158.                          
  159.   More information:       User guide ,  Bug list , Internals ,  Change
  160.                          history .
  161.                          
  162.   Wider scope:            W3 servers , Other WWW software
  163.                          
  164.  Features include
  165.  
  166.       Installation under inetd or run stand-alone
  167.       
  168.       Can be run stand-alone by normal user
  169.       
  170.       Automatically generates hypertext view of directory tree
  171.  
  172.  
  173. T. Berners-Lee                                                       3
  174.  
  175.                                  WWW Server Guide)        14 July 1993
  176.  
  177.       
  178.       Uses "README" files to document directory listings
  179.       
  180.       Handles multimple formats of same file, selects format
  181.       apropriate for client  capabilities
  182.       
  183.       Document name to filename mapping for longer-lived document
  184.       names
  185.       
  186.       Can act as gateway for WAIS, news, etc if needed
  187.       
  188. WorldWideWeb distributed code
  189.  
  190.  See the CERN copyright .  This is the README file which you get when
  191.  you unwrap one of our tar files. These files contain information
  192.  about hypertext, hypertext systems, and the WorldWideWeb project. If
  193.  you have taken this with a .tar file, you will have only a subset of
  194.  the files.
  195.  THIS FILE IS A VERY ABRIDGED VERSION OF THE INFORMATION AVAILABLE ON
  196.  THE WEB.   IF IN DOUBT, READ THE WEB DIRECTLY. If you have not got
  197.  ANY browser installed yet, do this by telnet to info.cern.ch (no
  198.  username or password).
  199.  
  200.   ARCHIVE DIRECTORY STRUCTURE
  201.  Under /pub/www, besides this README file, you'll find bin, src and
  202.  doc directories.  The main archives are as follows:
  203.  
  204.   bin/xxx/bbbb            Executable binaries of program bbbb for
  205.                          system xxx. Check what's there before you
  206.                          bother compiling. (Note HP700/8800 series is
  207.                          "snake")
  208.                          
  209.   bin/next/WorldWideWeb_v.vv.tar.Z
  210.                          The Hypertext Browser/editor for the NeXT --
  211.                          binary.
  212.                          
  213.   src/WWWLibrary_v.vv.tar.Z
  214.                           The W3 Library. All source, and Makefiles
  215.                          for selected systems.
  216.                          
  217.   src/WWWLineMode_v.vv.tar.Z
  218.                           The Line mode browser - all source, and
  219.                          Makefiles for selected systems. Requires the
  220.                          Library .
  221.                          
  222.   src/WWWDaemon_v.vv.tar.Z
  223.                           The HTTP daemon, and WWW-WAIS  gateway
  224.                          programs. Source.  Requires the Library.
  225.                          
  226.   src/WWWMailRobot_v.vv.tar.Z
  227.                           The Mail Robot.
  228.                          
  229.  
  230.  
  231. T. Berners-Lee                                                       4
  232.  
  233.                                  WWW Server Guide)        14 July 1993
  234.  
  235.   doc/WWWBook.tar.Z       A snapshot of our internal documentation -
  236.                          we prefer you to access this on line -- see
  237.                          warnings below.
  238.                          
  239.   BASIC WWW SOFTWARE INSTALLATION FROM SOURCE
  240.  This applies to the line mode client and the server.  Below, $prod
  241.  means LineMode or Daemon depending on which you are building.
  242.  
  243.     Generated Directory structure
  244.  The tar files are all designed to be unwrapped in the same (this)
  245.  directory. They create different parts of a common directory tree
  246.  under that directory. There may be some duplication. They also
  247.  generate a few files in this directory: README.*, Copyright.*, and
  248.  some installation instructions (.txt).
  249.  The directory structure is, for product $prod  and machine $WWW_MACH
  250.  
  251.   WWW/$prod/Implementation
  252.                           Source files for a given product
  253.                          
  254.   WWW/$prod/Implementation/CommonMakefile
  255.                          The machine-independent parts of the Makefile
  256.                          for this product
  257.                          
  258.   WWW/$prod/$WWW_MACH/    Area for compiling for a given system
  259.                          
  260.   WWW/All/$WWW_MACH/Makefile.include
  261.                          The machine-dependent parts of the makefile
  262.                          for any product
  263.                          
  264.   WWW/All/Implementation/Makefile.product
  265.                          A makefile which includes both parts above
  266.                          and so can be used from any product, any
  267.                          machine.
  268.                          
  269.     Compilation on already supported platforms
  270.  You must get the WWWLibrary tar file as well as the products you want
  271.  and unwrap them all from the same directory.
  272.  You must define the environmant variable WWW_MACH to be the
  273.  architecure of your machine (sun4, decstation, rs6000, sgi, snake,
  274.  etc)
  275.  In directory WWW, type BUILD.
  276.  
  277.     Compilation on new platforms
  278.  If your machine is not on the list:
  279.  
  280.       Make up a new subdirectory of that name under WWW/$prod and
  281.       WWW/All, copying the contents of a basically similar
  282.       architecture's directory.
  283.       
  284.       Check the  WWW/All/$WWW_MACH/Makefile.include for suitable
  285.       directory and flag definitions.
  286.       
  287.       Check the file tcp.h for the system-specific include file
  288.  
  289. T. Berners-Lee                                                       5
  290.  
  291.                                  WWW Server Guide)        14 July 1993
  292.  
  293.       coordinates, etc.
  294.       
  295.       Send any changes you have to make back to
  296.       www-request@info.cern.ch for inclusion into future releases.
  297.       
  298.       Once you have this set up, type BUILD.
  299.       
  300.   NEXTSTEP BROWSER/EDITOR
  301.  The browser for the NeXT is those files contained in the application
  302.  directory WWW/Next/Implementation/WorldWideWeb.app and is compiled.
  303.  When you install the app, you may want to configure the default page,
  304.  WorldWideWeb.app/default.html. These must point to some useful
  305.  information! You should keep it up to date with pointers to info on
  306.  your site and elsewhere. If you use the CERN home page note there is
  307.  a link at the bottom to the master copy on our server.   You should
  308.  set up the address of your local news server with
  309.  
  310.                       dwrite WorldWideWeb NewsHost  news
  311.  
  312.  replacing the last word with the actual address of your news host.
  313.  See Installation instructions .
  314.  
  315.   LINE MODE BROWSER
  316.  Binaries of this for some systems are available in /pub/www/bin/ .
  317.  The binaries can be picked up, set executable, and run immediately.
  318.  If there is no binary, see "Installation from source" above.
  319.   (See Installation notes ).  Do the same thing (in the same
  320.  directory) to the WWWLibrary_v.cc.tar.Z file to get the common
  321.  library.
  322.  You will have an ASCII printable manual in the file
  323.  WWW/LineMode/Defaults/line-mode-guide.txt which you can print out at
  324.  this stage. This is a frozen copy of some of the online
  325.  documentation.
  326.  Whe you install the browser, you may configure a default page. This
  327.  is /usr/local/lib/WWW/default.html for the line mode browser. This
  328.  must point to some useful information! You should keep it up to date
  329.  with pointers to info on your site and elsewhere. If you use the CERN
  330.  home page note there is a link at the bottom to the master copy on
  331.  our server.
  332.  Some basic documentation on the browser is delivered with the home
  333.  page in the directory WWW/LineMode/Defaults. A separate tar file of
  334.  that directory (WWWLineModeDefaults.tar.Z) is available if you just
  335.  want to update that.
  336.  The rest of the documentation is in hypertext, and so wil be readable
  337.  most easily with a browser. We suggest that after installing the
  338.  browser, you browse through the basic documentation so that you are
  339.  aware of the options and customisation possibilities for example.
  340.  
  341.   SERVER
  342.  The server can be run very simply under the internet  daemon, to
  343.  export a file directory tree as a browsable hypertext tree.  Binaries
  344.  are avilable for some platofrms, otherwise follow instructions above
  345.  
  346.  
  347. T. Berners-Lee                                                       6
  348.  
  349.                                  WWW Server Guide)        14 July 1993
  350.  
  351.  for compiling and then go on to " Installing the basic W3 server ".
  352.  
  353.   XMOSAIC
  354.  XMosaic is an X11/Motif  W3 browser.
  355.  The sources and binaries are distributed separately from
  356.  FTP.NCSA.UIUC.EDU, in  /Web/xmosaic.  Binaries are available for some
  357.  platforms.  If you have to build from source, check the README in the
  358.  distribution.
  359.  The binaries can be picked up, uncompressed, set "executable" and run
  360.  immediately.
  361.  
  362.   VIOLA BROWSER FOR X11
  363.  Viola is an X11 application for reading global hypertext.  If a
  364.  binary is available from your machine, in /pub/www/bin/.../viola*,
  365.  then take that and also the Viola "apps" tar file which contains the
  366.  scripts you will need.
  367.  To generate this from source, you will need both the W3 library and
  368.  the Viola source files.  There is an Imakefile with the viola source
  369.  directory. You will need to generate the XPA and XPM libraries and
  370.  the W3 library befere you make viola itself.
  371.  
  372.   DOCUMENTATION
  373.  In the /pub/www/doc directory are a number articles, preprints and
  374.  guides on the web.
  375.  See the online WWW bibliography for a list of these and other
  376.  articles, books, etc. and also the list of WWW Manuals available in
  377.  text and postscript form.
  378.  
  379.   GENERAL
  380.  Your comments will of course be most appreciated, on code, or
  381.  information on the web which is out of date or misleading. If you
  382.  write your own hypertext and make it available by anonymous ftp or
  383.  using a server, tell us and we'll put some pointers to it in ours.
  384.  Thus spreads the web...
  385.  
  386.                                                        Tim Berners-Lee
  387.                                                                       
  388.                                                   WorldWideWeb project
  389.                                                                       
  390.                                      CERN, 1211 Geneva 23, Switzerland
  391.                                                                       
  392.  Tel: +41 22 767 3755; Fax: +41 22 767 7155; email: timbl@info.cern.ch
  393.                                                                       
  394. Installing the basic WWW server
  395.  
  396.  Instructions for installing it under unix using the inet daemon are
  397.  here.
  398.  There are special instructions if you are installing under VMS .
  399.  The usual way to install a daemon is to either run it from the
  400.  bootstrap command file (for example /etc/rc) so that it runs
  401.  continuously, or to set up the internet daemon (inetd) to run it when
  402.  a call comes in.
  403.  
  404.  
  405. T. Berners-Lee                                                       7
  406.  
  407.                                  WWW Server Guide)        14 July 1993
  408.  
  409.  See a csh script which does everything below for unix BSD systems but
  410.  which you should modify with care for your own system.
  411.  Note: With  version 2.0 on, a rule file is no longer essential if you
  412.  want to just export a directory tree.
  413.  The installation normally requires superuser status, but it is
  414.  poosible to run httpd from a terminal session as a normal user.
  415.  
  416.   LOG FILE
  417.  If  a log file is required,  make sure that the user name under which
  418.  the daemon is run  has the right to write the file
  419.  
  420.                                                                 Tim BL
  421.                                                                       
  422.   PRIVILIGED PORTS
  423.   
  424.    The TCP/IP port numbers below 1024 are special in that normal users
  425.    are not  allowed to run servers on them.  This is a security
  426.    feaure, in that if you connect to a service on one of these ports
  427.    you are fairly sure that you have the real thing, and not a fake
  428.    which some hacker has put up for you.
  429.    
  430.    The normal port number for W3 servers is port 80, which is such a
  431.    port. (This number is assigned by the Internet Assigned Numbers
  432.    Authority, IANA).
  433.    
  434.    When you run a server as a test from a non-priviliged account, you
  435.    will normally test it on other ports, such as 2784 or 5000
  436.    typically.
  437.    
  438.     Under unix
  439.     
  440.    The inet daemon (running as root) can listen for incomming
  441.    conections on port 80 and pass them down to a process with a safer
  442.    uid for the server itself. Of course, you have to be root to set up
  443.    the inet daemon.
  444.    
  445.     Under VMS
  446.     
  447.    Under UCX, The process running as a server needs BYPASS privilege
  448.    to listen to ports below 1024.  This might mean you have to install
  449.    the server.  With other TCP/IP packages, privilege of some sort is
  450.    similarly required.
  451.    
  452.    _________________________________________________________________
  453.    
  454.                                                                 Tim BL
  455.                                                                       
  456.   INSTALLING A DAEMON UNDER INETD
  457.  This is how to to set up the internet daemon (inetd) to run your
  458.  HTTPD server whenever a request comes in.   (These steps are the same
  459.  for any daemon under unix: you will probably find a similar thing has
  460.  been done for the FTP daemon, ftpd, for example.)
  461.  
  462.  
  463. T. Berners-Lee                                                       8
  464.  
  465.                                  WWW Server Guide)        14 July 1993
  466.  
  467.  
  468.     Step1
  469.  Copy the daemon program or shell script ( httpd in this example) into
  470.  a suitable directory such as /usr/etc. Protect it from anyone writing
  471.  to it except root.
  472.  
  473.     Step2
  474.  Put "http" in the /etc/services file, or use the name of a specific
  475.  service of your own if you want to use have a special port number.
  476.   (Exceptions: on a NeXT, see  using the NetInfomanager . On any
  477.  machine running NIS (yellow pages), see specicial instructions ).
  478.  For example,
  479.  
  480. http            80/tcp                  # WorldWideWeb server
  481.  
  482.     Step3
  483.  Put a line in the internet daemon configuration file,
  484.  /etc/inetd.conf. For example,
  485.  
  486. http    stream  tcp     nowait  nobody  /usr/etc/httpd          httpd
  487. /Public
  488.  
  489.  (That was all one line.) Here "http" is used as a link between the
  490.  services file and inetd.conf: it could have been any identifier.
  491.  "nobody" is the user name under which you want the daemon to run,
  492.  which determines what privileges it has for example to read data.
  493.  "/usr/etc/httpd" is the actual file name of the server. The rest of
  494.  the line is the arguments passed to httpd: arg0 is the program name,
  495.  "httpd",  by convention. Here the argument "/Public"  is the
  496.  directory tree to be exported. This is in fact the default if no
  497.  directory is given. See command line syntax for more details.
  498.  Note: The inted.conf format varies from system to system. If in
  499.  doubt, copy the format of other lines in your existing inted.conf.
  500.  For example, under ultrix there is no user name field -- everything
  501.  runs as root.
  502.  Note: there seem to be, on the NeXT at least, a limit of 4 arguments
  503.  passed across by inetd!
  504.  
  505.     Step 4
  506.  When you have updated inted.conf, find out which process is running
  507.  inetd, and send it a "HUP" signal.  On BSD unix (For system V, use
  508.  ps-el for ps aux) this looks like:
  509.  
  510.                 
  511.                 > ps aux | grep inetd | grep -v grep
  512.                 root        85   0.0  0.9 1.24M  304K ?  S     0:01 /u
  513. sr/etc/inetd
  514.                 > kill -HUP 85
  515.                 >
  516.  
  517.  
  518.     Test it
  519.  
  520.  
  521. T. Berners-Lee                                                       9
  522.  
  523.                                  WWW Server Guide)        14 July 1993
  524.  
  525.  Test the server with the line mode browser by giving its address
  526.  explicitly:
  527.  
  528.                         www http://myhost.dom.ain/welcome.html
  529.  
  530.  This assumes that you have a file "welcome.html" in your exported
  531.  directory.  If it doesn't work, you have probably missed something.
  532.  See notes on debugging .
  533.  
  534.                                                                 Tim BL
  535.                                                                       
  536.   USING NIS (YELLOW PAGES)
  537.  If your machine is running Sun's "Network Information Service",
  538.  originally know as 'yellow pages", read this.
  539.  You must:
  540.  
  541.       First make an addition to the /etc/services file just as for a
  542.       normal unix system.
  543.       
  544.       Then, change directory to /var/yp and type "make".
  545.       
  546.  This will  load the /etc/services file info the yellow pages
  547.  information system.
  548.  Some peopl ehave found that they needed to reboot he system afterward
  549.  for the change to take effect.
  550.  
  551.                                                                 Tim BL
  552.                                                                       
  553.   ADDING A SERVICE ON THE NEXT
  554.  The NeXT uses the the "netinfo" database instead of the /etc/services
  555.  file.  This is managed with the /NextAdmin/NetInforManager
  556.  application. Here's how to add the service "www":
  557.  
  558.       Start the NetInfomanager by  double-clicking on its icon.
  559.       
  560.       If you are operating in a cluster,  open either your local
  561.       domain (/hostname) or if you have authority, the whole cluster
  562.       domain (/). If you're not in a cluster,  just use the domain you
  563.       are presented with.
  564.       
  565.       Select "services" from the browser tree.
  566.       
  567.       Select "ftp" from the list of services
  568.       
  569.       Select "dupliacte" from the edit menu.
  570.       
  571.       Select "copy of  ftp" and double-click on its icon to get
  572.       theproperty editor.
  573.       
  574.       Click on  "name" and then on the value "copy of ftp". Change
  575.       this to "www" by typing "www" in the window at the botton, and
  576.       hitting return.
  577.  
  578.  
  579. T. Berners-Lee                                                       10
  580.  
  581.                                  WWW Server Guide)        14 July 1993
  582.  
  583.       
  584.       Click on "port", and then on the value "21". Change it to "80".
  585.       
  586.       Use "Directory:Save" menu (Command/s) to save the result. You
  587.       will have to give a root password or netinfo manager password.
  588.       
  589.                                                                 Tim BL
  590.                                                                       
  591. The Rule File
  592.  
  593.  The rule file (configuration file) defines how the WWW software will
  594.  translate a request into a document name.   For a server, it allows
  595.  one to provide an extra level of  name mapping above that given by
  596.  links in the file system. It allows, for example, out of date names
  597.  to mapped onto their more recent counterparts.
  598.  For the client, it allows access to certain servers to be remapped
  599.  for example caching servers, or to local copies of the same
  600.  information.
  601.  The rule file also allows access to be restricted.  This is
  602.  essential, to prevent, for example, unauthorized access to your
  603.  password file.
  604.  By default, the rule file /etc/httpd.conf is loaded, unless specified
  605.  otherwise with the -R or -r options .
  606.  See also: example rule files , Old format for software before 2.0,
  607.  Setting up gateways, Firewall gateways.
  608.  
  609.   FORMAT
  610.  Each line consists of an operation code and one or two parameters,
  611.  referred to as the template and the result. Anything on a line after
  612.  and including a hash sign (#) is ignored, as are empty lines.
  613.  The server uses the top rule first, then EACH SUCCESSIVE RULE  unless
  614.  told otherwise by PASS or FAIL. The operation codes are as follows
  615.  
  616.   map template result     If the address matches the template, use the
  617.                          result string from now on for future rules.
  618.                          
  619.   pass template           If the address maches the template, use it
  620.                          as it is, porocessing no further rules.
  621.                          
  622.   pass template result    If the string matches the template, use the
  623.                          result string as it is, processing no futher
  624.                          rules.
  625.                          
  626.   fail template           If the address matches the template,
  627.                          prohibit access, processing no futher rules.
  628.                          
  629.  The template string may contain at most one wildcard asterisk ("*").
  630.  The result string may have one wildcard only if the template has one.
  631.  When matching,
  632.  
  633.       Rules are scanned from the top of the file to the bottom.
  634.       
  635.  
  636.  
  637. T. Berners-Lee                                                       11
  638.  
  639.                                  WWW Server Guide)        14 July 1993
  640.  
  641.       If a request matches a "map" template exactly, the result string
  642.       is used instead of the original string and applied to successive
  643.       rules.
  644.       
  645.       If the request maches a "map" template with wildcard, then the
  646.       text of the request which matches the wildcard is inserted in
  647.       place of the wildcard in the result string to form the
  648.       translated request. If the result string has no wildcard, it is
  649.       used as it is.
  650.       
  651.       When a map substitution takes place, the rule scan continues
  652.       with the next rule using the new string in place of the request.
  653.        This is not the case if a pass ro fail is matched: they
  654.       terminate the rule scan.
  655.       
  656.   SUFFIX DEFINITIONS
  657.  As well as any mapping lines in the rule file, the rule file may be
  658.  used to define the data types of files with particular suffixes.  The
  659.  syntax
  660.  
  661.                 suffix  <suffix>  <representation> <encoding> [ <quali
  662. ty> ]
  663.  
  664.  for example:
  665.  
  666.                 suffix  .pc     text/plain          7bit        1.0
  667.                 suffix  *.*     application/binary  binary      0.1
  668.                 suffix  *       text/plain          7bit
  669.  
  670.  
  671.  The parameters are as follows:
  672.  
  673.   <suffix>                The last part of the filename. There are two
  674.                          special cases. "*.*" matches to all files
  675.                          which have not been matched by any explicit
  676.                          suffixes but do contain a dot. "*" by itself
  677.                          matches to any file which does not match any
  678.                          other suffix.
  679.                          
  680.   <representation>        A MIME "content-type" style description of
  681.                          the repreentation in fact in use in the file.
  682.                           See the HTTP spec.  This need not be a real
  683.                          MIME type -- it will only be used if it
  684.                          matches a type given by a client.
  685.                          
  686.   <encoding>              A MIME content transfer encoding type.  Much
  687.                          more limited in variety than representations,
  688.                          basically whether the file is ASCII (7bit or
  689.                          8bit) or binary. A few other encodings are
  690.                          allowed, and maybe extension to compression.
  691.                          
  692.   <quality>               Optional. A floating point number between
  693.                          0.0 and 1.0 which determines the relative
  694.  
  695. T. Berners-Lee                                                       12
  696.  
  697.                                  WWW Server Guide)        14 July 1993
  698.  
  699.                          merits of files xxx.* which differ in their
  700.                          suffix only, when a link to xxx.multi is
  701.                          being resolved.  Defaults to 1.0.
  702.                          
  703.   PRESENTATION DEFINITIONS
  704.  In the rule file for a client, you can define the presentation of a
  705.  given data type. The syntax is
  706.  
  707.                 presentation   <representation>  <command-string>
  708.  
  709.  where the parameters are
  710.  
  711.   <representation>        A MIME-style content type. You can use
  712.                          regulare MIME types, such as image/jpeg, or
  713.                          your own extensions which start with x-, such
  714.                          as image/x-tiff, application/x-my-app.  See
  715.                          also above .
  716.                          
  717.   <command string>        The command needed to display a temporary
  718.                          file of this type.  A "%s" within this string
  719.                          will be replaces with the name of the
  720.                          temporary file.  Note that is any file suffix
  721.                          has been specified as corresenponding to this
  722.                          representation, then the temporarty file will
  723.                          be give that (or the first if there is a
  724.                          choice) suitable suffix.
  725.                          
  726.                                                                 Tim BL
  727.                                                                       
  728.   RULE FILE EXAMPLES
  729.  A basic rule file for the http daemon might look like this (it looked
  730.  different before version 2.0 ):
  731.  
  732.  
  733. pass    /          file:/u/john/welcome.html
  734. pass    /*         file:/u/john/public/*
  735. fail   *
  736.  
  737.  The first line maps the root document onto a specific document about
  738.  the server, and accepts it.  (see etiquette about the welcome page)
  739.  The second line maps all document names onto filenames in a
  740.  particular directory and accepts them.
  741.  The third line disallows access to all other documents. (There won't
  742.  be in any in this case because of the mapping, but its wise to put in
  743.  for later).
  744.  
  745.     Second example
  746.     
  747.  
  748. map    /            /tnotes/welcome.html
  749. map    /tnotes/*    file:/u/john/public/*
  750. map    /seminars/*  file:/u/jane/seminars/*
  751.  
  752.  
  753. T. Berners-Lee                                                       13
  754.  
  755.                                  WWW Server Guide)        14 July 1993
  756.  
  757. pass   file:/u/john/public/*
  758. pass   file:/u/jane/seminars/*.html
  759. fail   *
  760.  
  761.  The first line maps the root document onto a specific document about
  762.  the server.   Because it is "map and not "pass",  it DOESN'T accept
  763.  it  but passes it on for futher mapping by lines futher down.
  764.  The second line maps all document names starting with /tnote/ onto
  765.  filenames in a particular directory where john maintains the
  766.  technical notes. If someone else takes over the technical notes, we
  767.  can change this. Here we are starting to distinguish between document
  768.  names and file names. This can be carried much further if necessary,
  769.  but one level of mapping is enough to allow for changes of
  770.  administration of different areas.
  771.  The third line separately maps the seminar information into Jane's
  772.  directory.
  773.  The fourth and fifth line enable access to anything in John's
  774.  "public" directory, and any .html file in Jane's "seminar" directory
  775.  tree. Note here that the * maps to any sequence INCLUDING SLASHES so
  776.  all files in any subdirectory of /u/jane/seminars will be enabled so
  777.  long as they end in .html.
  778.  The bottom line will pick up for example any attempt to use the
  779.  server to access non-html files in Jane's seminars directory.
  780.  
  781.     Configuration file for a WAIS gateway
  782.  The httpd daemon can be used as a WAIS gateay if it has been compiled
  783.  with the necessary options and linked with the freeWAIS software. A
  784.  suitable configuration file is
  785.  
  786. map     /*              wais://*
  787. pass    wais://*
  788. fail    *
  789.  
  790.  
  791. Server Command Line
  792.  
  793.  The command line syntax for the basic www server allows a number of
  794.  options and an optional directory argument.
  795.  
  796.                         httpd  [options] [directory]
  797.  
  798.  The directory argument, if present, indicates the directory to be
  799.  exported. (Version 2.0 and later only.)  If not present, either a
  800.  rule file is be used, to export combinations of directories, or else
  801.  the default is to export the "/Public" directory tree.
  802.  
  803.   EXAMPLES
  804.   
  805.                         httpd -p 80  -dyt /ftp/pub
  806.  
  807.  This exports the entire /ftp/pub tree with browsable directories and
  808.  README files included at the top of directory listings.
  809.  
  810.  
  811. T. Berners-Lee                                                       14
  812.  
  813.                                  WWW Server Guide)        14 July 1993
  814.  
  815.  
  816.                         httpd
  817.  
  818.  This comamnd in the inetd configuration file inetd.conf exports the
  819.  /Public directory tree.  This tree may contain soft links to other
  820.  directory trees.
  821.  
  822.   -dn                     Disable directory browsing. An attempt to
  823.                          access a directory will generate an error
  824.                          response.
  825.                          
  826.   -dy                     Enable direcory browsing.  Directories are
  827.                          returned as hypertext documents. See browsing
  828.                          directories . This is the default.
  829.                          
  830.   -ds                     Enable directory browsing only for
  831.                          directories containing a file named
  832.                          ".www_browsable".
  833.                          
  834.   -dt                     For any browsable directory which contains a
  835.                          README file, include the text of the README
  836.                          file at the top of the document before the
  837.                          listing. This is the default.
  838.                          
  839.   -db                     As -dt but put the README at the bottom,
  840.                          after the listing.  The -db and -dt options
  841.                          may be combined with -dy as -dyb, -dty etc.
  842.                          
  843.   -dr                     Disables the README inclusion feature .
  844.                          
  845.   -l  file                Log all calls to the given file. The file is
  846.                          appended to if it already exists.
  847.                          
  848.   -p port                 Specify the port number. If this option is
  849.                          not given, the daemon assumes that it has
  850.                          been run by inetd, and uses stdin and stdout
  851.                          as its communication channel . Note that port
  852.                          numbers under 1024 are privileged .
  853.                          
  854.   -v                      Verbose mode. Copious trace messages are
  855.                          written to the standard output stream. Mainly
  856.                          for debugging.
  857.                          
  858.   -r file                 Load a rule file . The rules are added after
  859.                          any rules already loaded.  Inhibits the
  860.                          loading of the default rule file.
  861.                          
  862.   -R                      Do not use. Inhibit the loading of the
  863.                          default rule file.  Warning: running without
  864.                          a rule file  normally poses a security
  865.                          problem.  It won't work in general as only
  866.                          the path part of a URL is input into the rule
  867.  
  868.  
  869. T. Berners-Lee                                                       15
  870.  
  871.                                  WWW Server Guide)        14 July 1993
  872.  
  873.                          file, and a fully qualifiue URL (with file:
  874.                          in front for example) is required on output.
  875.                          
  876.                                                                 Tim BL
  877.                                                                       
  878. Debugging the daemon
  879.  
  880.  Suppose you think you have installed a W3 server but it doesn't work.
  881.  That is, you have followed the installation instructions and the test
  882.  at the end fails. Here we assume you have used port 80.  If you have
  883.  a situation not handled by this problem-solving guide, please mail
  884.  me.
  885.  Type
  886.  
  887.         www http://myhost.domain:80/
  888.  
  889.  
  890.  What happens?
  891.  
  892.       "Cannot connect to information server" message, "Unable to
  893.       access document" or some other generic-sounding error message
  894.       
  895.       An empty document is displayed
  896.       
  897.       A document containing the words "Document address invalid or
  898.       access not authorised", or some "Error 500" message is displayed
  899.       
  900.       A document is displayed, but not what you wanted the server to
  901.       give in response to that document name (/)
  902.       
  903.                                                                 Tim BL
  904.                                                                       
  905.   DOCUMENT ADDRESS INVALID
  906.  You have accessed a W3 server and you get back a message "Document
  907.  address invalid or access not authorized", or some other error
  908.  message from the server.
  909.  The 1.x server does not (originally for security reasons)
  910.  distringuish between a document which does not exist, and one to
  911.  which you are not allowed access.  However, most server are public
  912.  servers which allow access to anyone, so if you are following a bona
  913.  fide link, this could mean
  914.  
  915.       You have been passed a bad document address. If you are
  916.       following a link, check with the author of the document which
  917.       contained the link.
  918.       
  919.       The document has been moved. Check with the server
  920.       administrator. You should be able to find out who runs the
  921.       server by going to the welcome page (type "g /" with the line
  922.       mode browser) and seeing a link to information about the
  923.       maintainers.
  924.       
  925.  
  926.  
  927. T. Berners-Lee                                                       16
  928.  
  929.                                  WWW Server Guide)        14 July 1993
  930.  
  931.  If you are the server administrator, and you can't  understand why
  932.  the daemon refuses to deliver the file,
  933.  
  934.       Check the rule file if you have one.  Think out way the document
  935.       name will be mapped successively by each line, and what the
  936.       result will be. Checking the trace below may help clarify this.
  937.       
  938.       Run the daemon with trace from a terminal session to get trace
  939.       information
  940.       
  941.                                                                 Tim BL
  942.                                                                       
  943.   CAN'T CONNECT TO SERVER
  944.   
  945.    There is more information you can get.  use the "verbose" option on
  946.    the browser to find out what went wrong:
  947.    
  948.                         www -v http://myhost.domain:80/
  949.  
  950.    What do you get? A load of trace messages. There are several cases.
  951.    
  952.       The browser can't look up the name of the host. If it can, it
  953.       will display "Parsed address as" message. If not, try fixing
  954.       your name server or /etc/hosts file, or quoting the IP number of
  955.       the host in decimal notation (like 128.141.77.45) instead.
  956.       
  957.       The browser can get to the host but gets "Connection refused"
  958.       status back .
  959.       
  960.       Your browser gets an error number but prints "error message not
  961.       translated". This is because when it was compiled on your
  962.       platform it didn't know what form the error message table took.
  963.       Try the same thing form a unix platform for example.
  964.       
  965.       You get some network error like "network unreachable". Depending
  966.       on whether the IP network is your responsibility or not, and
  967.       your attitude to life, either fix it,  try again in an hour's
  968.       time, or complain to someone.
  969.       
  970.    _________________________________________________________________
  971.    
  972.                                                                 Tim BL
  973.                                                                       
  974.   "CONNECTION REFUSED"
  975.   
  976. The browser tries to connect to the daemon but gets this status in the
  977.                                                                 trace.
  978.                                                                       
  979. This means that noone was listening on that port number. Check the por
  980. t numbers match btween server and client.  Make sure you specify the p
  981.                 ort number explicitly in the document address for www.
  982.                                                                       
  983. If you are running the daemon without the inet daemon, (with the -a op
  984.  
  985. T. Berners-Lee                                                       17
  986.  
  987.                                  WWW Server Guide)        14 July 1993
  988.  
  989. tion) then try running it from the terminal with -v as well.  The trac
  990. e for the server should say "socket, bind and listen all ok". If it do
  991. es, and you still get "connection refused", then you must be talking t
  992.  o the wrong host (or, conceivably, different ethernet adapters on the
  993.                                                             same host)
  994.                                                                       
  995.  If you are running with the inet daemon, then check both the services
  996. file (/etc/service) or database (yellow pages, netinfo) if your system
  997.  uses it,  and the /etc/inetd.conf file. Check the service name matche
  998.                                                   s between these two.
  999.                                                                       
  1000. Did you remember to kill -HUP the inet daemon when you changed the int
  1001.                                                          ed.conf file?
  1002.                                                                       
  1003. Try running the deamon from a shell window to see what happens better.
  1004.                                                                 Tim BL
  1005.                                                                       
  1006.   YOU GET AN EMPTY DOCUMENT
  1007.  The document sent back is empty, but there is no error message.
  1008.  The inet daemon has started a process to run your server but it
  1009.  immediately failed.  Possibilities include:
  1010.  
  1011.       The daemon may not be in the file specified, or may not be
  1012.       executable by the specified user (or, if a user id is not
  1013.       specified in your variety of inetd.conf, root)
  1014.       
  1015.       You have written your own daemon and it crashes.
  1016.       
  1017.       You are using ours and it crashes (mail us!)
  1018.       
  1019.  Try running the daemon from a terminal window to see what happens.
  1020.  
  1021.                                                                 Tim BL
  1022.                                                                       
  1023.   BAD OUTPUT FROM THE DAEMON
  1024.   
  1025.                                                  These are some ideas:
  1026.                                                                       
  1027.       Try running the server from the terminal .
  1028.       
  1029.       Check the HTML source the daemon produces with
  1030.       
  1031.         www -source http://myost.domain:80/
  1032.  
  1033.       Try telnetting to the daemon and simulating the client:
  1034.       
  1035.  
  1036.         > telnet myhost.domain 80
  1037.         Connected to myhost.domain on port 80
  1038.         Escape is ^[
  1039.         GET /documentname
  1040.  
  1041.  
  1042.  
  1043. T. Berners-Lee                                                       18
  1044.  
  1045.                                  WWW Server Guide)        14 July 1993
  1046.  
  1047.                                                                 Tim BL
  1048.                                                                       
  1049.   TELNETTING TO A SERVER
  1050.   
  1051. Most implementations of telnet allow you to specify a port number. Und
  1052. er unix this is often just a second parameter, under VMS a /PORT optio
  1053.                                                                     n.
  1054.                                                                       
  1055. The HTTP protocol is a telnet protocol, so you can simulate it just by
  1056.  typing things in.  This will help you to see exactly what a sending b
  1057. ack, and it will check you that it really is the server not the browse
  1058.                                                 r which has a problem.
  1059.                                                                       
  1060.             Here is an example. (You type "telnet..." and  "GET ...").
  1061.                                                                       
  1062.         > telnet myhost.domain 80
  1063.         Connected to myhost.domain on port 80
  1064.         Escape is ^[
  1065.         GET /documentname
  1066.         <PLAINTEXT>
  1067.         Document name "/documentname" invalid.
  1068.  
  1069.   RUNNING UNDER SHELL
  1070.  You don't have to run the daemon under the inted if it doesn't work.
  1071.  You can run it from a shell session.
  1072.  If the daemon is httpd, then run it from your terminal, with a
  1073.  different port number like 8000.  You use the -p option .
  1074.  
  1075.                 httpd -p 8000
  1076.  
  1077.  Note: You must be root (under VMS, have some privilege) to run with a
  1078.  port number below 1024.
  1079.  If you select a port above 1024, then you can run as a normal user.
  1080.  This way, anyone can publish files on the net. Howeever, it isn't
  1081.  very reliable, as your server will not automatically come back up if
  1082.  the machine is rebooted. In the long term it is best to install it
  1083.  under "inetd".
  1084.  You can't use a port number which has been used by a daemon process
  1085.  recently, so you may have to switch port number if you ^C and restart
  1086.  the daemon.  When it is running like this, you can read the trace
  1087.  messages and use a debugger on it if necessary. (See also: telnetting
  1088.  to the server )
  1089.  
  1090.     Debugging using Trace
  1091.  If you can't understand why a server refuses to give back a document,
  1092.  then run wiith the -v option to get trace.  You will see the daemon
  1093.  setting up the rules for translating requests into local URLs, and
  1094.  you will see its attept to access the file (assuming you map requests
  1095.  onto files).
  1096.  
  1097.                 httpd -v -p 8000
  1098.  
  1099.  Try to access the document from a client using another terminal
  1100.  
  1101. T. Berners-Lee                                                       19
  1102.  
  1103.                                  WWW Server Guide)        14 July 1993
  1104.  
  1105.  window. Look at the trace printout.  It will probably explain what is
  1106.  happening.  If it includes specific messages below, follow them to
  1107.  detailed help.
  1108.  
  1109.       Can't find internet hostname `'
  1110.       
  1111.  If you still can't figure out the problem, mail your local guru help
  1112.  desk or if desperate www-request@info.cern.ch ENCLOSING a copy of
  1113.  that trace.
  1114.  
  1115.     Even simpler
  1116.  For testing a daemon very simply, without using a client, you can
  1117.  make the terminal be the client.  With httpd, or if the server is a
  1118.  shell script "myserver", try just running it with the terminal and
  1119.  typing GET /documentname into its input:
  1120.  
  1121.                         > httpd
  1122.                         GET /
  1123.  
  1124.  Try it with the -v option if what comes back isn't a formatted
  1125.  document.
  1126.  
  1127.                                                                 Tim BL
  1128.                                                                       
  1129. The basic W3 server:  Internals
  1130.  
  1131.  This describes the generic hypertext daemon (server) program. The
  1132.  daemon is part of the WWW project. See also:
  1133.  
  1134.       User guide .
  1135.       
  1136.       Bugs and Features
  1137.       
  1138.       Other servers
  1139.       
  1140.  The hypertext daemon, like the ftp daemon, is a program which
  1141.  responds to an incomming tcp connection and provides a service to the
  1142.  caller.
  1143.  
  1144.   SOURCES
  1145.  A compilation option (SELECT) controls whether more than one
  1146.  connection can be handled at a time. This is a function of whether
  1147.  the TCP/IP implementation beneath the application has a working
  1148.  "select()" routine. If  it is not true, this implementation services
  1149.  one connection, then drops it before accepting another one. In
  1150.  neither case does the daemon concurrently serve two clients, nor does
  1151.  it fork off a process to do that.
  1152.  The basic server loop is in the file HTDaemon.c .  A separate module
  1153.  ( for example HTRetrieve.c ) contains the code to handle one request.
  1154.  Various specific versions of this may be written for different
  1155.  flavours of server. Also used are various modules of WWW common code.
  1156.   The httpd released from CERN uses almost the entire W3 library and
  1157.  
  1158.  
  1159. T. Berners-Lee                                                       20
  1160.  
  1161.                                  WWW Server Guide)        14 July 1993
  1162.  
  1163.  can therefore access any object which a browser running on that
  1164.  machine can access, and return it as HTML or some other format.
  1165.  
  1166.                                                                 Tim BL
  1167.                                                                       
  1168. Bugs and Improvements needed
  1169.  
  1170.  Improvements to be made in the HTTP daemon program are as follows.
  1171.  (Se also Features )
  1172.  
  1173.       Call shell scripts to perform searches on directory trees or
  1174.       documents.
  1175.       
  1176.       The HTRetrieve() routine ought to be able to pick up the user
  1177.       node and userid, etc...
  1178.       
  1179.       Ought to have chroot option. (wwwww July 93)
  1180.       
  1181.                                                                 Tim BL
  1182.                                                                       
  1183. Daemon features: Update history
  1184.  
  1185.  History list for the WWW daemon . (See also bugs ).  Many other
  1186.  changes to the daemon are in fact changes to the common code library.
  1187.  
  1188.   2.06  7 JUNE 93
  1189.   
  1190.       Bug fix: Load error 500 returned as proper HTTP status, not as
  1191.       simple document.
  1192.       
  1193.       WAIS gateway now caches source files again.
  1194.       
  1195.       Bug fix: Daemon used to try to display graphics file locally on
  1196.       the server when the client couldn't display them!  Cause of much
  1197.       confusion  :-)
  1198.       
  1199.   2.05
  1200.   
  1201.       Big bug fix in local file directory handling .. didn't work in
  1202.       2.04!
  1203.       
  1204.   2.04  28 APRIL 93
  1205.   
  1206.       With the properly compiled libwww library, this daemon will
  1207.       operate as a WAIS, news etc gaetway if so configured.
  1208.       
  1209.       WAIS gateway operation bug fix.
  1210.       
  1211.   2.03-BETA: UNRELEASED
  1212.   
  1213.       Bug fix: operation with no rule file didn't work as expected.
  1214.       
  1215.  
  1216.  
  1217. T. Berners-Lee                                                       21
  1218.  
  1219.                                  WWW Server Guide)        14 July 1993
  1220.  
  1221.   2.02-BETA: 17 MARCH 93
  1222.   
  1223.       Misleading error trace removed.
  1224.       
  1225.       Compiled on HP, SGI, Sun, DEC, NeXT and binaries available
  1226.       
  1227.       Binary handling fixed in library.
  1228.       
  1229.       Reference to missing HTDirRead.h removed.
  1230.       
  1231.       Assumes that user can handle files of unknown format
  1232.       (application/binary).
  1233.       
  1234.   2.00-ALPHA  15 MAR 93
  1235.   
  1236.       Simple command line -- with no parameters, exports the /Public
  1237.       directory.
  1238.       
  1239.       Multiformat handling -- see library changes for 2.0.  Links to
  1240.       .multi filenames resolve to any file with same root, any
  1241.       recognised extension.
  1242.       
  1243.   UNREALEASED 0.9B
  1244.   
  1245.       Bug fix: If a PASS or FAIL line in the configuration file acted
  1246.       on a single document id (ie no wildcard) then it crashed the
  1247.       daemon. (HTRules.c, 17-Jun-92, TBL).
  1248.       
  1249.   SEPT 1991 V0.3
  1250.   
  1251.       Bug fix: Plain text files were returned to be parsed as SGML,
  1252.       causing them to come out as garbage. (Mike Sendall)
  1253.       
  1254.   AUGUST 1991 V 0.2
  1255.   
  1256.       -R option now suppresses default rule file.
  1257.       
  1258.       Rule file format changed completely. Now allows authorisation of
  1259.       specific paths only.
  1260.       
  1261.   JUNE 1991 VERSION 0.1
  1262.   
  1263.       -r and -R options for rules
  1264.       
  1265.       Default address is now for Inet daemon working. (29 June)
  1266.       
  1267.       -l option to log to a file.
  1268.       
  1269.       -a option for address other than default
  1270.       
  1271.  _________________________________________________________________
  1272.  
  1273.                                                                 Tim BL
  1274.  
  1275. T. Berners-Lee                                                       22
  1276.  
  1277.                                  WWW Server Guide)        14 July 1993
  1278.  
  1279.                                                                       
  1280.                        A SHELL SERVER FOR HTTP
  1281.                                    
  1282.  The HTTP protocol is very simple. The following is an example of a
  1283.  server program written in sh:
  1284.  
  1285. #! /bin/sh
  1286. read get docid
  1287. echo "<TITLE>$docid</TITLE>"
  1288. echo Here is the data
  1289.  
  1290.  The docid may have a trailing carriage return to be stripped off on
  1291.  some systems. You can modify that script to produce the data you
  1292.  actually want. The HTML syntax for marked-up text is fairly simple,
  1293.  but if you want just to send plain text, then just send the
  1294.  .PLAINTEXT.tag first:
  1295.  
  1296. #! /bin/sh
  1297. read get docid
  1298. sed -f txt2html.sed $docid
  1299.  
  1300.  or in csh
  1301.  
  1302. #! /bin/csh
  1303. request = ( `echo $<`)
  1304. if ($#request <2) exit
  1305. sed -f txt2html.sed $request[2]
  1306.  
  1307.  
  1308.  When you have written your script, set the execute bit and then
  1309.  configure the inet daemon to run it . A few more examples:
  1310.  
  1311.       A sh script to generate a menu for files in a directory
  1312.       
  1313.       An awk script to generate menu from a list of files .
  1314.       
  1315.       A perl script for all kinds of stuff on the ASIS server
  1316.       
  1317.       The shell script of the Hytelnet gateway
  1318.       
  1319.  If you know the perl language, then that is a powerful (if otherwise
  1320.  incomprehensible) language with which to hack together a server.
  1321.  See also a case study of mapping a database onto the web .
  1322.  All contributions to these examples welcome!
  1323.  
  1324.                                                                 Tim BL
  1325.                                                                       
  1326. Making a server
  1327.  
  1328.    Here is a run-through of what is needed to make a www server , with
  1329.    examples from a suggested server for the HEPDATA base of Mike
  1330.    Whalley . See also etiquette .
  1331.  
  1332.  
  1333. T. Berners-Lee                                                       23
  1334.  
  1335.                                  WWW Server Guide)        14 July 1993
  1336.  
  1337.    
  1338.    Basically, to make the data available, you make a server which is a
  1339.    modified version of your program. When a user follows a link to
  1340.    HEPDATA (or runs a command to jump straight there), the client
  1341.    program opens a connection to a server program on a VM machine
  1342.    (say, but could be VMS or unix). The server in turn runs your
  1343.    program.
  1344.    
  1345.    Let me just describe the essence of the changes needed so that you
  1346.    can get an idea of how much effort would be involved.
  1347.    
  1348.    The first thing you do is to make up an arbitrary naming method for
  1349.    anything which HEPDATA can display.  In this I include the welcome
  1350.    page, any menu, any article, any help text.  Typically one invents
  1351.    a hierarchical naming scheme, like
  1352.    
  1353.         /HEPDATA                        The first "welcome" menu
  1354.         /HEPDATA/HELP                   The top-level help
  1355.  
  1356.         /HEPDATA/HELP/REAC              The help on the reaction datab
  1357. ase.
  1358.  
  1359.         /HEPDATA/REAC                   The reaction database itself
  1360.  
  1361.         /HEPDATA/REAC?P+PBAR            list of reactions involving p
  1362. and pbar (?)
  1363.  
  1364.         /HEPDATA/DATA/RD125V687         Some article (say).
  1365.  
  1366.    You do this because, whereas an interactive user follows a path
  1367.    through the program, the W3 user calls the program once for each
  1368.    thing. There is no "state" information. This allows one to make a
  1369.    hypertext link to any part of the scheme and jump back in again
  1370.    later. For example, one might want to quote an article, or the
  1371.    reaction database, or a particular list of reactions.
  1372.    
  1373.    Now all you do is modify the program so that, given a name above,
  1374.    it will
  1375.    
  1376.    return the required document.  This means basically turning it from
  1377.    a sequence the user goes through into a set of conditionals to
  1378.    isolate each of the individual cases above. Apart from that, the
  1379.    data retrieval code is unchanged apart from the output formatting.
  1380.    Many of the options in fact mean mapping the name onto a fixed
  1381.    
  1382.    file's name its the searches which have to activate real code.
  1383.    
  1384.    The hypertext trick you need to use in the menus. Where an option
  1385.    is normally output to the screen, you have to tell the client what
  1386.    to ask for is the user selects that option. For example, in the
  1387.    main menu /HEPDATA you have an option which gives the help. You
  1388.    would represnt this "anchor" as
  1389.  
  1390.  
  1391. T. Berners-Lee                                                       24
  1392.  
  1393.                                  WWW Server Guide)        14 July 1993
  1394.  
  1395.    
  1396. <A NAME=4 HREF=/HEPDATA/HELP> Help </A>
  1397.  
  1398.    "Help" is all that is displayed, with some indication that it is an
  1399.    option. If the user choses (clicks a mouse on, choses by number
  1400.    depending on which client he has) then the client asks the server
  1401.    for /HEPDATA/HELP. ("A" is for "anchor", "HREF" is for "hypertext
  1402.    reference")
  1403.    
  1404.    For the index searches, it's as simple. When the server sends the
  1405.    text called /HEPDATA/REAC it also sends a special tag . This tells
  1406.    the client to enable a FIND command, or find panel etc (depending
  1407.    on the client). You don't have to do any human interface work. The
  1408.    client automatically comes back with a search coded up in the form
  1409.    /HEPDATA/REAC?P+PBAR etc. Your server in turn returns a menu (say)
  1410.    with pointers to the data which has been found.
  1411.    
  1412.    You can also put some formatting tags (like headings) which will
  1413.    make the data look really nice on a window system.
  1414.    
  1415.    _________________________________________________________________
  1416.    
  1417.                                                                 Tim BL
  1418.                                                                       
  1419.                            W3 AND HTMLTOOLS
  1420.                                    
  1421.  These tools aid managements of W3 servers, generation of hypertext,
  1422.  etc.
  1423.  
  1424.   W3 basic daemon         Part of the W3 project code.
  1425.                          
  1426.   Index search server    which is a slight modification to basic CERN
  1427.                          daemon, with a couple of scripts and WAIS
  1428.                          programs. Implements searches on entire
  1429.                          directory trees of WWW documents using WAIS
  1430.                          inverted indexing.
  1431.                          
  1432.   Gateway servers        which you can take and adapt.
  1433.                          
  1434.   Framemaker interface    There are some tar files on the anonymous
  1435.                          FTP archive on file://info.cern.ch/www/src
  1436.                          which allow FRAMEmaker to be used as a W3
  1437.                          tool. Dan Conolly, Convex. Incldues MIF HTML
  1438.                          translation.
  1439.                          
  1440.   Making HTML into TeX    We did this with the "WWW Book" to print it.
  1441.                          See the Makefile for example, and the scripts
  1442.                          html2latex.sed and sub1.sed . We wrote a
  1443.                          special introduction, but otherwise all the
  1444.                          text was hypertext from the W3 project.
  1445.                          
  1446.   Generating HTML         These are scripts for generating SGML
  1447.  
  1448.  
  1449. T. Berners-Lee                                                       25
  1450.  
  1451.                                  WWW Server Guide)        14 July 1993
  1452.  
  1453.                          hypertext from things like directory
  1454.                          listings, etc. Also, for checking and
  1455.                          correcting dubious HTML.
  1456.                          
  1457.   WP5.1 to HTML          WordPerfect 5.1 to HTML conversion
  1458.                          
  1459.   LaTex to HTML           Code from Nikos Drakos, Computer Based
  1460.                          Learning Unit, University of Leeds.
  1461.                          
  1462.   Server log analysis     Analysing server logs requires first of all
  1463.                          changing the numeric internet node numbers
  1464.                          into domain names. httpd-analyse.c is a
  1465.                          program to do that. Feed the results through
  1466.                          awk and grep of your choice!
  1467.                          
  1468.   Server log analysis     Getsites .c is a program which generates
  1469.                          reports on a weekly or monthly basis.
  1470.                          
  1471.   Web-roaming  robot etc
  1472.                           Guido van Rossum's knobot code in "Python"
  1473.                          language.
  1474.                          
  1475.   Telnet server           Setting up a service machine for anonymous
  1476.                          users to log in to a www client.
  1477.                          
  1478.   Mail Robot              A program to return any information in the
  1479.                          web information by electronic mail
  1480.                          
  1481.                                                                 Tim BL
  1482.                                                                       
  1483. HTMLGeneration
  1484.  
  1485.  Here are some example files you can use for generating HTML from
  1486.  lists of files and other things.
  1487.  
  1488.   RTF to HTML            Convert RTF (using specific styles) into
  1489.                          HTML.
  1490.                          
  1491.   fix-html.pl            written by Dan Connolly, is a perl script to
  1492.                          legitimize old HTML files into SGML-abiding
  1493.                          HTML (as per the DTD that Dan created).
  1494.                          
  1495.   text2html.sed           A sed script to turn plain text into
  1496.                          plain-looking valid HTML markup so that it
  1497.                          will be rendered just as it was.
  1498.                          
  1499.   ls2html.awk            is an awk script which will just take a list
  1500.                          of names and generate a menu.
  1501.                          
  1502.   dir2html               is a shell script which generates a menu of
  1503.                          pointers to files with particular suffixes in
  1504.                          a set of directories. It also includes a
  1505.  
  1506.  
  1507. T. Berners-Lee                                                       26
  1508.  
  1509.                                  WWW Server Guide)        14 July 1993
  1510.  
  1511.                          README file at the head of the hypertext list
  1512.                          if one exists.
  1513.                          
  1514.   htn2html.c              See the Hytelnet gateway for the program to
  1515.                          convert hytelnet data into HTML.
  1516.                          
  1517.   findrefs.pl             Written by Ari Lemmke, finds references
  1518.                          http:... in plain text files and generates
  1519.                          anchors out of them.
  1520.                          
  1521.  You can make any variations on these you like of course. [CERN does
  1522.  not accept any responsability for things quoted in these lists].
  1523.  
  1524. Updating the Newsgroup lists
  1525.  
  1526.  To update some of the news pages automatically you must be logged on
  1527.  to the news server or have the news directories mounted.
  1528.   Carl mentioned that you must be a member of the UNIX group news
  1529.  (otherwise you won't have permission to read the news directories)
  1530.  but that doesn't seem to be necessary for these functions.
  1531.  
  1532.   UPDATEGROUPS
  1533.  This script updates the list of newsgroups. For the overview list ,
  1534.  it saves everything before the "Others" heading, and adds on a list
  1535.  of pointers to newsgroup stems not already mentioned in the saved
  1536.  hypertext.
  1537.  For each stem, it saves any command before the glossary list of
  1538.  groups, and then regenerates that list of groups.
  1539.  
  1540.   NEWSPAGE_UPDATE (OLD)
  1541.  The script NewsPage_Update creates complete lists of active groups
  1542.  for the following groups: alt, bionet, bit, biz, cern, ch, comp,
  1543.  eunet, gnu, news, rec, sci, soc, talk, vmsnet. It does this by
  1544.  writing the header in explicitly for each group, and then generating
  1545.  a list of of subgroups using FindGroups
  1546.  For comp and news, a full list is placed in fullcomp.html and
  1547.  fullnews.html. The files comp.html and news.html are formatted by
  1548.  hand already, and so are not touched by the script.
  1549.  NewsPage_Update works by writing some HTML text into a file for each
  1550.  group to be updated, called [newsgroup_name].html.new, then calling
  1551.  the script FindNewsGroups.  This checks the file
  1552.  /usr/local/lib/news/newsgroups for the groups within the current
  1553.  group which are active.  Finally the new file is renamed to remove
  1554.  the .new.
  1555.  The list of stems to search, and their titles and any other comment
  1556.  is hardcoded into the NewsPage_Update script, and the list is
  1557.  DUPLICATED in Others_Update.
  1558.  
  1559.   OTHERS_UPDATE
  1560.  The Others_Update script finds stems which are not included in the
  1561.  Overview.html file, but which are active.  This list of which groups
  1562.  not to include is hardcoded into the script.  For each group, it
  1563.  
  1564.  
  1565. T. Berners-Lee                                                       27
  1566.  
  1567.                                  WWW Server Guide)        14 July 1993
  1568.  
  1569.  calls GrpCreate.  This adds the name to OtherGroups/Overview.    It
  1570.  then runs FindNewsGroups for each group.
  1571.  
  1572.     NOTE
  1573.  Once the script has completed all the .new groups must be renamed
  1574.  manually to remove the .new extension.
  1575.  
  1576.   GRPCREATE
  1577.  This reads a newsgroup stem name from stdin.
  1578.  It then creates the top of a file for the list of groups with that
  1579.  stem. This will be called ${nn}.html.new. where ${nn} is the stem
  1580.  name. Unfortunately there is no way to get a description of the stem
  1581.  to include in this file. However, if the .html file already exists,
  1582.  it will use everything up to an excluding the first DL tag from the
  1583.  .html file for the .html.new file. Therefore, everything above the DL
  1584.  tag may be hand edited.
  1585.  GrpCreate adds a pointer from OtherGroups/Overview.html.new to the
  1586.  .html file.
  1587.  The .html file is renamed .html.old, and teh .html.new becomes .html,
  1588.  with diffs being stored in a .diffs file under the date.
  1589.  
  1590. .\" Macros for HTML
  1591.  .\" Jim Davis 6 Nov 92
  1592.  .ps 12
  1593.  .in 5
  1594.  .de B
  1595.  ..
  1596.  
  1597.  .de R
  1598.  ..
  1599.  .de H1
  1600.  .ti -5
  1601.  .ps 18
  1602.  \fB\\$1\fR
  1603.  .ps 12
  1604.  .br
  1605.  ..
  1606.  .de H
  1607. 2
  1608.  .ti -3
  1609.  .ps 14
  1610.  \fB\\$1\fR
  1611.  .ps 12
  1612.  .br
  1613.  ..
  1614.  .de H3
  1615.  \\$1
  1616.  .br
  1617.  ..
  1618.  
  1619.  .de H4
  1620.  \\$1
  1621.  ..
  1622.  .de H5
  1623.  \\$1
  1624.  ..
  1625.  .de H6
  1626.  \\$1
  1627.  ..
  1628.  .de H7
  1629.  \\$1
  1630.  .
  1631. .
  1632.  .de H8
  1633.  \\$1
  1634.  ..
  1635.  .de H9
  1636.  \\$1
  1637.  ..
  1638.  .de DL
  1639.  .in +5
  1640.  ..
  1641.  .de DE
  1642.  .in
  1643.                 -5
  1644.  ..
  1645.  .de DT
  1646.  .ti -3
  1647.  * \\$1
  1648.  ..
  1649.  .de DD
  1650.  .br
  1651.  ..
  1652.  
  1653.  
  1654.                                                                       
  1655.  
  1656. Date: Wed, 4 Nov 1992 16:48:34 -0500
  1657. From: Jim Davis <davis@dri.cornell.edu>
  1658. To: wei@xcf.berkeley.edu, www-talk@nxoc01.cern.ch
  1659. Subject: improved printing of WWW files
  1660.  
  1661. If you can't quite manage to live without hardcopy, you may wish somet
  1662. imes to print WWW files.  I have written a couple of scripts to do thi
  1663. s.  They are particularly useful with Pei Wei's excellent Viola WWW br
  1664.                                                                 owser.
  1665.                                                                       
  1666.                          A tar archive is available for anonymous FTP:
  1667.                                                                       
  1668.                                dri.cornell.edu/pub/davis/print-www.tar
  1669.                                                                       
  1670.                                                           It contains:
  1671.                                                                       
  1672.  
  1673. README
  1674. print-www
  1675. print-www.l
  1676. html-to-latex
  1677. html2latex.sed (modified version of original CERN version)
  1678.  
  1679.  
  1680.  
  1681. T. Berners-Lee                                                       28
  1682.  
  1683.                                  WWW Server Guide)        14 July 1993
  1684.  
  1685. The hardest part was writing the perl script to obtain documents via h
  1686.       ttp protocol - turns out you cant just run pipes through telnet.
  1687.                                                                       
  1688. The conversion from HTML to LaTex is not really robust yet -  this  is
  1689.   doubly hard since there is no guarentee that the HTML is legal.  But
  1690.  at least it works for my test cases.  No doubt it will be improved in
  1691.                                                                  time.
  1692.                                                                       
  1693.                                                            best wishes
  1694.                                                                       
  1695.                            GATEWAY SOFTWARE
  1696.                                    
  1697.  See also: W3 server software , W3 client software
  1698.  These are servers which provide data extracted from other systems.
  1699.  they are built using code from the basic daemon, or scripts.
  1700.  
  1701.   FIND gateway           for CERN/VM XFIND which calls a REXX exec to
  1702.                          get the information from the XFIND system
  1703.                          running on the CERNVM mainframe.
  1704.                          
  1705.   Hytelnet gateway        A gateway to Peter Scott's list of telnet
  1706.                          sites
  1707.                          
  1708.   VMS Help gateway        This allows any VMS help files to be made
  1709.                          available to WWW clients. Runs on VAX/VMS.
  1710.                          
  1711.   WAISGate                A gateway to information available using the
  1712.                          W.A.I.S. protocol.
  1713.                          
  1714.   DCLServer               A server for VMS systems which allows you to
  1715.                          write a gateway to your own favorite
  1716.                          information system using DCL.
  1717.                          
  1718.   System33                A (big) csh script server providing data
  1719.                          including Xerox System33 documents, man pages
  1720.                          in plain text, phone numbers, etc. etc...!
  1721.                          
  1722.   Oracle                  A generic server to oracle. Could be used as
  1723.                          a basis for gateways to specific Oracle
  1724.                          databases.
  1725.                          
  1726.   Geography               Gateway to the Geography server at U
  1727.                          Michigan
  1728.                          
  1729.   TechInfo                TechInfo is the CWIS from MIT.  A gateway
  1730.                          exists thanks to Linda Murphy/Upenn.
  1731.                          
  1732.                                                                 Tim BL
  1733.                                                                       
  1734. Geography gateway
  1735.  
  1736.                                                       Wed, 18 Nov 1992
  1737.                                                                       
  1738.  
  1739. T. Berners-Lee                                                       29
  1740.  
  1741.                                  WWW Server Guide)        14 July 1993
  1742.  
  1743. Jim Davis  Here is a quickly hacked up Gateway from WWW to the Univers
  1744. ity of Michigan Geography server.  It expects one argument, a  WWW doc
  1745.  id.  It ignores the "pathname", extracts the search words, then passe
  1746. s those to the server.  It does NOT parse the data returned by the ser
  1747.  ver (that is an improvment yet to be done) but you can understand the
  1748.                                                                output.
  1749.                                                                       
  1750. To use this, you would need to have an HTTP server running someplace w
  1751.  here you can attach this gateway.  I can provide the very simple HTTP
  1752. server I use here, but this subject is already documented in the WWW o
  1753.                                                   nline documentation.
  1754.                                                                       
  1755.                                                    Source code in perl
  1756.                                                                       
  1757. The WWW TechInfo gateway
  1758.  
  1759.  This is a gateway built using the basic server code, plus one source
  1760.  file in C. Thanks to Linda Murphy of Univerity of Pennsylvania for
  1761.  the etchinfo code.
  1762.  
  1763.       The gateway data as running at CERN
  1764.       
  1765.       The source file
  1766.       
  1767.                                                                 Tim BL
  1768.                                                                       
  1769. The W.A.I.S. - WWW gateway
  1770.  
  1771.  This is an example of a WWW server and a WAIS client. It is just the
  1772.  regular httpd daeomon linked with:
  1773.  
  1774.       a version of the libwww library which was compiled with the
  1775.       DIRECT_WAIS option, and includes the HTWAIS module;
  1776.       
  1777.       the freeWAIS libraries from CNIDR.
  1778.       
  1779.  See a summary of some data available through the gateway .
  1780.  
  1781.   WSRC FILES
  1782.  The gateway keeps a cache of WAIS "source" files. These are files
  1783.  describing WAIS servers. They are normally picked up automatically by
  1784.  searching a "directory of servers" index. Once the gateway has picked
  1785.  up a desciption of  a server,  it uses the description to describe
  1786.  the server to those who follow links to it. (See the HTWSRC module of
  1787.  libwww)
  1788.  These source files are parsed, and are kept in the directory
  1789.  /usr/local/lib/WAIS under the server name, port, and database name.
  1790.  
  1791.                                                                 Tim BL
  1792.                                                                       
  1793. VMS Help server
  1794.  
  1795.  This server can provide WWW users with any information stored in VMS
  1796.  
  1797. T. Berners-Lee                                                       30
  1798.  
  1799.                                  WWW Server Guide)        14 July 1993
  1800.  
  1801.  Help format.
  1802.  
  1803.     Additional information available:       :->
  1804.     
  1805.   Try me !               An example server running at CERN
  1806.                          
  1807.   Status                 The current state, pointers to more
  1808.                          information
  1809.                          
  1810.                                                                    JFG
  1811.                                                                       
  1812.   GATEWAY TO VMS HELP: INTERNALS
  1813.   
  1814.    These are technical and installation notes about the gateway to VMS
  1815.    Help . Please send bug reports and suggestions to Jean-Francois
  1816.    Groff (jfg@cernvax.cern.ch).
  1817.    
  1818.     Sources
  1819.     
  1820.    The program consists of the generic daemon HTDaemon.c , and a
  1821.    special function, stored in VMSHelpGate.c , to retrieve VMS Help
  1822.    data and convert it to HTML.
  1823.    
  1824.     Installation
  1825.     
  1826.    The files you need are as follows. You should customise them,
  1827.    putting in your own directory names.:
  1828.    
  1829.   launchgate.com         Runs the server as a detached process. Put a
  1830.                          call to this from your sys$startup procedure,
  1831.                          wherever that is. This detaches a job to use
  1832.                          www_server.com ans input, and a log file as
  1833.                          output.
  1834.                          
  1835.   www_server.com         The server command file, a wrapper for the
  1836.                          actual server executable.  In this file, set
  1837.                          the temporary directory for the storage of a
  1838.                          cache of .HLP files. This file runs the
  1839.                          executable.
  1840.                          
  1841.   test.com               Here is just an example of  a file to build
  1842.                          and test the server.
  1843.                          
  1844.   descrip.mms            This is an MMS file to build the executable.
  1845.                          If you don't have MMS, you may be able to
  1846.                          figure out from loking at it which commands
  1847.                          you should use.  You can find a machine
  1848.                          running MMS and generate the equivalent .com
  1849.                          files. See comments at the top of this file
  1850.                          on how to run it.
  1851.                          
  1852.    The source files and executable .EXE are currently (October 92)
  1853.  
  1854.  
  1855. T. Berners-Lee                                                       31
  1856.  
  1857.                                  WWW Server Guide)        14 July 1993
  1858.  
  1859.    available on HEP  decnet in vxcrna::disk$d1:[jfg.www...].  Note
  1860.    also you can pick up the master sources from dxcern:: automatically
  1861.    by running
  1862.    
  1863.    MMS /MACRO=(U=DXCERN::).
  1864.    
  1865.    If you are not in HEP decnet, you should find the sources in the
  1866.    WWWDaemon_v.vv.tar.Z file in the distribution. See the README file.
  1867.    
  1868.    _________________________________________________________________
  1869.    
  1870.                                                                    JFG
  1871.                                                                       
  1872.   VMS HELP SERVER BUGS
  1873.   
  1874. This is a list of known bugs and desired improvements. Don't let it sh
  1875. rink too fast : send your bug reports and suggestions to Jean-Francois
  1876.                                           Groff (jfg@cernvax.cern.ch).
  1877.                                                                       
  1878.       The keyword search works fine on any number of levels down, but
  1879.       then the generic daemon doesn't know how deep the server went,
  1880.       so anchor names lack the intermediate levels. Solution :
  1881.       generate anchor names relative to the input path (before '?').
  1882.       
  1883.       DANGER : Attempts to access VMS topics with a weird name like
  1884.       ":=" will crash the server because VMS will try to create a .HLP
  1885.       file with an invalid file specification due to these special
  1886.       characters. Solution : Make a good escaping system (that works
  1887.       with VMS and Un*x styles as well). Crude and bulletproof
  1888.       solution : Ignore any offending topic name !
  1889.       
  1890.       Reference to another help library through @ will only search
  1891.       SYS$HELP for the corresponding .HLB file.
  1892.       
  1893.       We need an overview page that lists all help libraries
  1894.       available.
  1895.       
  1896.         __________________________________________________________ JFG
  1897.                                                                       
  1898.   VMS HELP SERVER FEATURES
  1899.   
  1900.    This lists the main features of the VMS Help gateway, with
  1901.    improvements in reverse chronological order. Help make it grow fast
  1902.    : send your bug reports and suggestions to Jean-Francois Groff
  1903.    (jfg@cernvax.cern.ch).
  1904.    
  1905.     Experimental gateway 0.4 -- 2 Oct 91
  1906.     
  1907.       Accepts user queries by number or by name. In the latter case,
  1908.       can go down several levels, for instance, from the main help
  1909.       page : "cc /lib" will go to topic CC, subtopic /LIBRARY.
  1910.       
  1911.  
  1912.  
  1913. T. Berners-Lee                                                       32
  1914.  
  1915.                                  WWW Server Guide)        14 July 1993
  1916.  
  1917.       On invocation with only //node:port/HELP, displays the contents
  1918.       of the standard VMS Help library SYS$HELP:HELPLIB.HLB (function
  1919.       lis_to_html).
  1920.       
  1921.       Address format : //node:port/HELP/[@library/][topic[/subtopic]*]
  1922.       
  1923.    __________________________________________________________
  1924.    
  1925.                                                                    JFG
  1926.                                                                       
  1927.                              STYLE GUIDE
  1928.                                    
  1929.  This guide is designed to help you create a hypertext database
  1930.  effectively communicates your knowledge to the reader.  It has been
  1931.  prepared in the light of comments by readers, and many demands by
  1932.  providers of online documentation.   Some of the points made may be
  1933.  influenced by personal preference, and some may be common sense, but
  1934.  a collection of points has been demanded, and so here it is.
  1935.  The guide is designed to be read sequentially, but feel free to
  1936.  depart from this.  The sections are as follows:
  1937.  
  1938.       Introduction
  1939.       
  1940.       Overall structure of your work
  1941.       
  1942.       Within each document
  1943.       
  1944.       Test your document
  1945.       
  1946.       Background reading
  1947.       
  1948.       Reader comments
  1949.       
  1950. This document is open to comment
  1951.  
  1952.  Suggestions are strongly invited, if you think of anything mail it to
  1953.  timbl@info.cern.ch, mentioning the Style Guide for Online Hypertext
  1954.  or its URL.
  1955.  
  1956.                                                                 Tim BL
  1957.                                                                       
  1958. Introduction
  1959.  
  1960.  You are going to write (or generate ) some online hypertext. Because
  1961.  hypertext is potentially unconstrained you are a little daunted. Do
  1962.  not be. You can write a document as simplly as you like.  In many
  1963.  ways, the simpler the better.
  1964.  You will be writing a number of separate files.  These files will be
  1965.  linked to each other, and to external documents, to make your final
  1966.  work.
  1967.  You may think of your work as a "document", and if it were on paper,
  1968.  then you would call it that.  In the online case though, we tend to
  1969.  refer to each individual file as a document. A  document may
  1970.  
  1971. T. Berners-Lee                                                       33
  1972.  
  1973.                                  WWW Server Guide)        14 July 1993
  1974.  
  1975.  correspond, in the book analogy, to a section or a subsection, or
  1976.  even a footnote. In this guide, we'll refer to the whole collection
  1977.  as a work.
  1978.  The document is the unit by which information is picked up.  At any
  1979.  one time, a document is completely loaded into the reader's computer.
  1980.  It is also normally the amount you edit at any one time, though with
  1981.  a good editor you will probably have a number of documents open at a
  1982.  time.
  1983.  The section on structure discusses how you organize your material
  1984.  into documents.   Another section discusses how to organise your
  1985.  material within a document .
  1986.  (Up to overview ,  on to structure )
  1987.  
  1988.                                                                 Tim BL
  1989.                                                                       
  1990. Structure
  1991.  
  1992.  If you have in mind a body of information to put across to your
  1993.  reader, you probably have a mental organisation for it.  Normally
  1994.  this is a sort of hierarchical tree, like the chapters of a book if
  1995.  you were to write a book.
  1996.  Keep this structure.  It helps readers to have a tree structure as a
  1997.  basis for the book: it gives them a feeling of knowing where they
  1998.  are.   You can also us this structure for oganising your files in
  1999.  directories.
  2000.  You should also bear in mind:
  2001.  
  2002.       The reader's preconceived structure
  2003.       
  2004.       The idea of overlapping trees
  2005.       
  2006.       How big to make each document
  2007.       
  2008.  (Up to overview , back to Introduction, on to: writing each document)
  2009.  
  2010.                                                                 Tim BL
  2011.                                                                       
  2012.   THE READER'S STRUCTURE .
  2013.  Remember always the audience for whom you are writing.  If they are
  2014.  novices in the subject,  it will normally help if you are firm about
  2015.  the structure of your work, so that they can learn the structure of
  2016.  the knowledge itself.   For example, if you feel that the subject
  2017.  falls into three distinct areas, then that is an importnat thing to
  2018.  teach.
  2019.  If, however, your readers will already have some knowledge in the
  2020.  subject, then they will already have formed their own structure for
  2021.  it.  In this case they will conciously or subconsiouly know where
  2022.  they expect to find things. If your structure is different from
  2023.  theirs,  enforcing it too strongly will confuse them and put them
  2024.  off.
  2025.  You may in this case have resist a strong tendency to put across your
  2026.  own structure strongly and to the detriment of all others.  There are
  2027.  
  2028.  
  2029. T. Berners-Lee                                                       34
  2030.  
  2031.                                  WWW Server Guide)        14 July 1993
  2032.  
  2033.  two solutions.
  2034.  If you have a single well-defined audience in mind, who will share a
  2035.  similar world view, then try to write excatly for that world view
  2036.  rather than yours.
  2037.  If you are simultaneously writing for more than one group, then you
  2038.  must provide for both.
  2039.  When you make a reference,  qualify it  with a clue to allow soime
  2040.  people to skip it. For example, "If you really want to know how it
  2041.  works inside, see the Internals guide", or "A step-by-step
  2042.  introduction is in the tutorial".
  2043.  Provide links for both reader's views. Your work will be more
  2044.  connected than a simple tree, but with proper qualifiaction, noone
  2045.  should get lost.
  2046.  Provide two sepate tree "roots". For example, you can write a
  2047.  step-by-step tutorial  and a functionaly direct reference tree for
  2048.  the same data. Both will at the lowest level have the same data, but
  2049.  while the first will deal with the simple things first, the second
  2050.  may be functionnaly grouped.   This is just like having several
  2051.  indexes to a book.  The tutirial might also include information which
  2052.  the reference work does not.
  2053.  
  2054.  (Up to overview , back to Introduction , on to: writing each document
  2055.  )
  2056.  
  2057.                                                                 Tim BL
  2058.                                                                       
  2059.   OVERLAPPING TREES
  2060.  Here is an example of a work (describing some programming functions,
  2061.  say) with two separate structures:
  2062.  
  2063.                         Tutorial                        Reference
  2064.                            |                                |
  2065.                   Let's do it togther                  ---------------
  2066. --
  2067.                 from simple to difficult              |
  2068. |
  2069.                             |                   by Functional      Alp
  2070. habetical
  2071.                             |                       group            b
  2072. y name
  2073.                   Task oriented examples              |
  2074. |
  2075.                             |                          ---------------
  2076. --
  2077.                             |                               |
  2078.                   Examples of use of               Syntax definition f
  2079. or
  2080.                   specific functions   <-------->    specific function
  2081. s
  2082.  
  2083.  The novice user starts at the top left, and works his way down. Where
  2084.  he needs specific details, he will get down to the examples and from
  2085.  
  2086.  
  2087. T. Berners-Lee                                                       35
  2088.  
  2089.                                  WWW Server Guide)        14 July 1993
  2090.  
  2091.  them a link to the underlying definitive desctiptions of each. As far
  2092.  as he is concerned, he is reading a tree-strucured work.   In fact,
  2093.  he is reading the same information as the expert who, coming in to
  2094.  check on one particular function, then looks up an example of its
  2095.  use.
  2096.  (Up to structure , back to user's structure , on to: document size )
  2097.  
  2098.                                                                 Tim BL
  2099.                                                                       
  2100.   HOW BIG TO MAKE EACH DOCUMENT
  2101.  The most important point here is that a document should put across a
  2102.  well-defined concept.  It is not generally worth splitting one idea
  2103.  arbitrarily into two bits in order to make the bits smaller.  Nor is
  2104.  it a good idea to put together ideas which area really separate just
  2105.  to make a bigger document.
  2106.  A document can be as small as a footnote .
  2107.  There are two upper limits on a document's size.  One is that long
  2108.  documents will take longer to transfer, and so a reader will not be
  2109.  able to simply jump to it and back as fast as he or she can think.
  2110.  This depends a lot on the link speed of course.
  2111.  The other limit is the difficulty for a reader to scroll through
  2112.  large documents. Readers with character based terminals don't general
  2113.  read more than a few screens.  They often only absorb what is on the
  2114.  first screen, as if that is not interesting they won't be bothered to
  2115.  scroll down.  Readers are also put off by being left at the top of a
  2116.  large document.
  2117.  Readers with graphic interfaces generally scroll through long
  2118.  documents with a scroll bar.   When the scroll bar is moved a small
  2119.  amount, the document should move a sufficiently small amount so that
  2120.  some of the original window-full is still left in the window.  This
  2121.  allows the reader to scan the document. If the document is any
  2122.  bigger, then it is basically unreadable, in that any movement of the
  2123.  scroll bar will loses the place and leaves the reader disoriented.
  2124.  Advantages with longer documents are that it is easier for readers
  2125.  with scrollbars to read through in an uninterrupted flow, if that is
  2126.  how the document is written.
  2127.  Also,  one doesn't have to go to the trouble of making (or
  2128.  generating) so many links and keeping them up to date if things are
  2129.  altered.  If making the links is a problem, just settle for one link
  2130.  to a contents page.  Some browsers have "next" and "previous" buttons
  2131.  to allow a document to be browsed serially according to a list.
  2132.  (In fact, one can normally scroll up and down explicitly page by
  2133.  page, but this is gives the same feeling as the terminal interface.)
  2134.  A rough guide, then, for the size of a document is:
  2135.  
  2136.       For online help, menus giving access to other things: small
  2137.       enough to fit on 24 lines.  Check this by using a terminal
  2138.       browser.
  2139.       
  2140.       For textual documents, of the order of half a letter-sized (A4)
  2141.       page to 5 pages.
  2142.       
  2143.  
  2144.  
  2145. T. Berners-Lee                                                       36
  2146.  
  2147.                                  WWW Server Guide)        14 July 1993
  2148.  
  2149.  (Up to structure , back to overlapping trees , on to: within each
  2150.  document )
  2151.  
  2152.                                                                 Tim BL
  2153.                                                                       
  2154. Within each document
  2155.  
  2156.  This section of the style guide deals with the layout of text within
  2157.  a "document", the unit of retrieval of information on the web.
  2158.  To be completed.
  2159.  You should try to:
  2160.  
  2161.       Sign your work
  2162.       
  2163.       Give its status
  2164.       
  2165.       Make links into context .
  2166.       
  2167.       Use context-free document titles
  2168.       
  2169.       Format device-independantly
  2170.       
  2171.       Write for the printed work too
  2172.       
  2173.       Write readable text despite the links
  2174.       
  2175.  (up to overview , back to structure , on to testing )
  2176.  
  2177.                                                                 Tim BL
  2178.                                                                       
  2179.   SIGN IT!
  2180.  An important aspect of information which helps keep it up to date is
  2181.  that one can trace its author.  Doing this with hypertext is easy --
  2182.  all you have to do is put a link to a page about the author (or
  2183.  simply to the author's phone book entry).
  2184.  Make a page for yourself with your mail address and phone number. At
  2185.  the bottom of files for which you are responsible, put a small note
  2186.  -- say just your initials -- and link it to that page. The address
  2187.  style (typically right justified) is useful for this.
  2188.   Your author page is also a convenient place to put and disclaimers,
  2189.  copyright noitices, etc which law or convention require. It saves
  2190.  cluttering up the mesages themselves with a long signature.
  2191.  If you are using the NeXT hypertext editor, then you can put this
  2192.  link from your default blank page so that it turns up on the bottom
  2193.  of each new document.
  2194.  ( up , back to ..., on to  giving your document's status)
  2195.  
  2196.   THE STATUS OF YOUR DOCUMENT
  2197.  Some information is definitive, some is hastily put together and
  2198.  incomplete. Both are useful to readers, so do not be shy to put
  2199.  information up which is incomplete or out of date -- it may be the
  2200.  best there is. However, do remember to state what the status is. When
  2201.  was it last updated? Is it complete? What is its scope? For a phone
  2202.  
  2203. T. Berners-Lee                                                       37
  2204.  
  2205.                                  WWW Server Guide)        14 July 1993
  2206.  
  2207.  book for example, what set of people are in it?
  2208.  Not every document needs a status declaration, if  there is something
  2209.  in the overview page of the work which covers it.
  2210.  You can of course also give a feel for the status of the text by its
  2211.  language ... bad spelling, missing capitals, and relaxed grammer all
  2212.  indicate informal notes.     Careful use of verbs such as "shall" and
  2213.  "should", and the introduction of Long Capitalised Noun Phrases
  2214.  (LCNPs) will give at least the impression of an ISO standard.  ;-)
  2215.  
  2216.     Date it
  2217.  In some cases it can be useful to put creation dates and last
  2218.  modified dates on your work.  (Note that this is the sort of thing
  2219.  which one could make a server do automatically with a little
  2220.  programming).
  2221.  Figure out whether putting one might later save the reader from
  2222.  following out of date information.
  2223.  (back to Sign It, On to links into context )
  2224.  
  2225.   LINKING TO CONTEXT
  2226.  A major difference between writing part of a serial text, and an
  2227.  online document, is that your readers may have jumped in from
  2228.  anywhere.   Even though you have only made links to it from one
  2229.  place, any other person may want to refer to that particular point,
  2230.  and will so make a link to that particular part of your work from
  2231.  their own. So  you can't rely on your reader having followed your
  2232.  path through your work.
  2233.  Of course if you are writing a tutorial, it will be important to keep
  2234.  the flow from one document to the next in the order you intended for
  2235.  its primary audience.   You may not wish to cater specially for those
  2236.  who jump in out of the blue, but it is wise to leave them with enough
  2237.  clues so as not to be hopelessly lost. Some ways of doing this are:
  2238.  
  2239.       Watch that your text and vocabulary stands by itself. Starting a
  2240.       document with "The next thing we we consider is..." or "The only
  2241.       solution to this problem is..." will certainly confuse.
  2242.       
  2243.       Sometimes the opening words refer to the context, and can be
  2244.       linked to background information.   For example, in the WWW
  2245.       project documentation, the first occurence of the acronym WWW is
  2246.       often linked back to the central project document.
  2247.       
  2248.       The navigation hints at the top or bottom of the document can
  2249.       give explicit pointers.  Examples are at the bottom of this
  2250.       document.
  2251.       
  2252.  It can also be useful to imagine as you are writing that  you
  2253.  yourself may wish to reuse the document. some day.
  2254.  (Part of style guide for online hypertext . Up to Writing each
  2255.  document , on to Title tag)
  2256.  
  2257.                                                                 Tim BL
  2258.                                                                       
  2259.  
  2260.  
  2261. T. Berners-Lee                                                       38
  2262.  
  2263.                                  WWW Server Guide)        14 July 1993
  2264.  
  2265.   DEVICE INDEPENDENCE
  2266.  The hypertext you write is stored in HTML language, which does not
  2267.  contain information about the fonts and paragraph shapes and spacing
  2268.  which should be used for displaying the document.
  2269.  This gives great advantages in that your document will be rendered
  2270.  successfully on whatever platform it is viewed, including a plain
  2271.  text terminal.
  2272.  You should be aware that different clients do use different spacing
  2273.  and fonts.   You should be careful to use the structuring elements
  2274.  such as headers and lists in the way in which they were intended.  If
  2275.  you don't like the rendering on your particular client, don't try to
  2276.  fix it by using inappropriate elements, or trying for example to
  2277.  force extra spacing with empty elements.  This may well end up being
  2278.  interpreted differently by other clients and looking very strange.
  2279.  You can in many cases configure the client displays each element.
  2280.  For example:
  2281.  
  2282.       Always use heading levels in order, with one heading level 1 at
  2283.       the top of the document, and if necessary several level 2
  2284.       headings, and then if necessary several level 3 headings under
  2285.       each level 2 heading.  If you don't like the way heading level 2
  2286.       is formatted, fix it on your client, don't just skip to heading
  2287.       level 3.
  2288.       
  2289.       Don't put extra spaces or blank lines into your text to pad it
  2290.       out, except in preformatted (PRE) sections.
  2291.       
  2292.       Don't refer in your text to facets of particular browesrs.
  2293.       Asking someone to "click here" won't make sense without a mouse,
  2294.       just as asking someone to "select a link by number" will betray
  2295.       the fact that you were using the line mode browser.  Just leave
  2296.       a link.  The instructions get boring as the user will normally
  2297.       know how to select a link.
  2298.       
  2299.  See also: testing your document .
  2300.  Following these guidelines you may find that the end result does not
  2301.  appear on your screen exactly as you would like, but your readers
  2302.  will probably be happier.
  2303.  (Part of the Style Guide for Online Hypertext .  Up to within each
  2304.  document , back to , on to printable hypertext)
  2305.  
  2306.                                                                 Tim BL
  2307.                                                                       
  2308.   PRINTABLE HYPERTEXT
  2309.  In an ideal world, paper might not be necessary.  In a next to ideal
  2310.  world, one would have enough time to write a hypertext version of a
  2311.  document and also a completely reauthor a paper version.  In the real
  2312.  world, you wilkl probably want to generate any printed documents and
  2313.  online documents from the same file.
  2314.  Suppose the HTML files will be the master, and you will generate the
  2315.  printable from this, by translation into TeX, etc.
  2316.  If you might one day want to do this, try to avoid references in the
  2317.  text to online aspects.  "See the section on device independence" is
  2318.  
  2319. T. Berners-Lee                                                       39
  2320.  
  2321.                                  WWW Server Guide)        14 July 1993
  2322.  
  2323.  better than "For more on device independence, click here.".  In fact
  2324.  we are talking about a form of device independence.
  2325.  Unfortunately the recommended practices of signing each document and
  2326.  giving navigational links  tend to mess up the printable copy, though
  2327.  one can of course develop ways of stripping them out if they follow a
  2328.  common format.
  2329.  (Up to:  within each document;  back to device independece, on to
  2330.  ...)
  2331.  
  2332.                                                                 Tim BL
  2333.                                                                       
  2334. Test your document
  2335.  
  2336.  In a way your hypertext is like a book, which you should have
  2337.  proof-read. In a way, it is like a program which you should have
  2338.  tested.  At least get someone from the group for which you wrote the
  2339.  document to read it and give you some feedback.  Other ideas are:
  2340.  
  2341.       Read the document several different client programs, to ensure
  2342.       that you have formatted it in a device independent way.
  2343.       
  2344.       Monitor the readership of your document. You can do this by
  2345.       analysing the server log files .    You may find that some parts
  2346.       are not being read, perhaps because people are looking in the
  2347.       wrong place for them.  You may see that people often follow a
  2348.       path and backtrack. If you can guess what they were looking for,
  2349.       you can make the clues around the link more helpful.  (Remember
  2350.       to keep log information confidential until you have removed user
  2351.       information from it.)
  2352.       
  2353.       Make it clear whether your will accept criticism or suggestions
  2354.       from your readers, and how they should send it.
  2355.       
  2356.       Ask people to solve problems using the document, and report on
  2357.       their success. If they fail, find out what they were looking
  2358.       for, whether it was in the document at all,
  2359.       
  2360.   HOW MUCH TESTING?
  2361.  Testing takes time.    The decision of how  much testing you do is
  2362.  based on the quality of the document you wish to provide.  You are
  2363.  balancing your reader's time and effort against yours.   If your
  2364.  document is "selling" an idea, or if you are selling the document or
  2365.  providing a service, you will want  to make it as easy as possible
  2366.  for the reader.   If many people will read your work, a little of
  2367.  your time will save a lot of theirs.
  2368.  If however you are documenting some obscure part of a system in which
  2369.  no one other than yourself is likely to be interested,  or if you
  2370.  feel that your readers are lucky to have anything available at all,
  2371.  there is no point wasting time testing it.  In the event of someone
  2372.  needing the information, they might have to go to some extra trouble
  2373.  to follow several links to find what they want, and then to
  2374.  understand what you have written.  This may be the most efficient way
  2375.  
  2376.  
  2377. T. Berners-Lee                                                       40
  2378.  
  2379.                                  WWW Server Guide)        14 July 1993
  2380.  
  2381.  of working.  I emphasize this because there is very much information
  2382.  which is for a fleeting moment in people's minds, or is hastily
  2383.  scribbled down on some file, and which may be important to posterity.
  2384.   It is better for this information to be available even in unpolished
  2385.  form than for it to be hidden out of embarrassment for its form.
  2386.  Before electronic technology, the effort of publishing was such that
  2387.  this information was never seen, and it was a waste, and and
  2388.  considered an insult to one's readers, to publish something which was
  2389.  not of high quality.  Nowadays, there is "publishing" at all levels,
  2390.  and both high quality and hasty documents have their value.    It is
  2391.  important, though, to make it clear what the quality of a document is
  2392.  when making a reference to it, to avoid disappointment.
  2393.  Monitoring the server log files will tell you which documents are
  2394.  really being read.  You can use your time most efficiently to improve
  2395.  the quality of those.  Of course, analysing the server log files also
  2396.  takes time!
  2397.  (Part of the Style Guide for Online Hypertext . Back to Within each
  2398.  doument, On to Background reading)
  2399.  
  2400.                                                                 Tim BL
  2401.                                                                       
  2402. Within each document
  2403.  
  2404.  This section of the style guide deals with the layout of text within
  2405.  a "document", the unit of retrieval of information on the web.
  2406.  To be completed.
  2407.  You should try to:
  2408.  
  2409.       Sign your work
  2410.       
  2411.       Give its status
  2412.       
  2413.       Make links into context .
  2414.       
  2415.       Use context-free document titles
  2416.       
  2417.       Format device-independantly
  2418.       
  2419.       Write for the printed work too
  2420.       
  2421.       Write readable text despite the links
  2422.       
  2423.  (up to overview , back to structure , on to testing )
  2424.  
  2425.                                                                 Tim BL
  2426.                                                                       
  2427. Background reading
  2428.  
  2429.  Some other documents which may be of relevance, if you are reading
  2430.  the Style Guide for Online Hypertext :
  2431.  
  2432.       The HTML Specification and references from it
  2433.  
  2434.  
  2435. T. Berners-Lee                                                       41
  2436.  
  2437.                                  WWW Server Guide)        14 July 1993
  2438.  
  2439.       
  2440.       A Beginner's Guide to writing HTML
  2441.       
  2442.       World-Wide Web server software - a list of pointers
  2443.       
  2444.       Web Ettiquette -- for Server Administrators
  2445.       
  2446.  (Back to testing, on to ...)
  2447.  
  2448.                               MAIL ROBOT
  2449.                                    
  2450.  The mail robot is a program which will accept incoming mail and allow
  2451.  remote users to:
  2452.  
  2453.       Subscribe to mailing lists (and unsubscribe)
  2454.       
  2455.       Retrieve information given a W3 addresss (URL)
  2456.       
  2457.  Originally from UC Berkeley, an enhanced robot is distributed as part
  2458.  of the world-wide web global information initiative . Futhur
  2459.  information available is:
  2460.  
  2461.   Help                    The help file for users of the robot service
  2462.                          
  2463.   Installation            Installation instructions for unix system
  2464.                          managers
  2465.                          
  2466.   Bugs                    Lists of improvements requested or needed.
  2467.                          
  2468.   Change history          A list of features introduced and bugs
  2469.                          fixed.
  2470.                          
  2471.   See also               Other WWW software
  2472.                          
  2473. Using the W3 mailing robot
  2474.  
  2475.  This robot maintains the W3 mailing lists, and allows W3 documents to
  2476.  be retrieved on request.
  2477.  You can subscribe or unsubscribe to any of the various WWW mailing
  2478.  lists by sending email to the robot "listserv@info.cern.ch" -- see
  2479.  the commands listed below.
  2480.  If you have any problems, requests or questions for a human being,
  2481.  mail "www-request@info.cern.ch". Lists are:
  2482.  
  2483.   www-announce            Anyone interested in WWW, who would like
  2484.                          information about new releases or new online
  2485.                          data available. Please refrain from posting
  2486.                          administrivia to this large list !
  2487.                          
  2488.   www-talk                Developers of WWW code, or those interested
  2489.                          in discussions of technical details
  2490.                          
  2491.  
  2492.  
  2493. T. Berners-Lee                                                       42
  2494.  
  2495.                                  WWW Server Guide)        14 July 1993
  2496.  
  2497.  You can also find information on WWW (as well as many other things!)
  2498.  by telnetting to info.cern.ch (no username, no password).
  2499.  If you want to pick up the WWW software, then use anonymous FTP to
  2500.  info.cern.ch and look in directory /pub/www. Subdirectories are src
  2501.  for the latest source packages, bin for executables for various
  2502.  machines, doc for "paper copies" of articles on WWW in PostScript and
  2503.  ASCII form. To read the latest documentation, use WWW !
  2504.  
  2505.   COMMANDS
  2506.  The commands understood by the listserv program are:
  2507.  
  2508.   HELP                    lists this file.  This is also sent whenever
  2509.                          a message to listserv is received from which
  2510.                          no valid command could be parsed.
  2511.                          
  2512.   HELP groupname          lists a brief description of the group
  2513.                          requested.
  2514.                          
  2515.   ADD listname            Add yourself to the list
  2516.                          
  2517.   DELETE listname         take yourself off the list
  2518.                          
  2519.   ADD address listname    Add yourself with a given mail address to
  2520.                          the given list. The address must not contain
  2521.                          spaces!
  2522.                          
  2523.   DELETE address listname
  2524.                           Remove the given name from the given list.
  2525.                          For all ADD/DELETE commands, mail is sent to
  2526.                          the address given to confirm the add or
  2527.                          delete operation.
  2528.                          
  2529.   SEND document-address   returns a document with the requested W3
  2530.                          address.
  2531.                          
  2532.   STOP                    Stop processing requests: ignore the rest of
  2533.                          the message. Needed if you send a signature
  2534.                          on the end of your message (or if some
  2535.                          gateway adds one). If in doubt, use it.
  2536.                          
  2537.  A command must be the first word on each line in the message.  Lines
  2538.  which do not start with a command word are ignored.  If no commands
  2539.  were found in the entire message, this help file will be returned to
  2540.  you. A single message may contain multiple commands; a separate
  2541.  response will be sent for each.
  2542.  
  2543.     Examples
  2544.     
  2545.  
  2546.         add www-announce
  2547.  
  2548.         add me@host.uni.edu www-announce
  2549.  
  2550.  
  2551. T. Berners-Lee                                                       43
  2552.  
  2553.                                  WWW Server Guide)        14 July 1993
  2554.  
  2555.         delete me@host.uni.edu www-talk
  2556.         
  2557.         send http://info.cern.ch/hypertext/DataSources/bySubject/Overv
  2558. iew.html
  2559.  
  2560.   SUBSCRIPTION
  2561.  If you are not sending mail from your preferred mail address, then
  2562.  you can use the second form of the command to give your mail address.
  2563.  If you are not on the internet, please convert your address into arpa
  2564.  stye. (For example, UK users please use international ordering
  2565.  joe@host.ac.uk) Just speficy the mailbox, without any spaces.
  2566.  If you omit the 'address' the command will assume the mailbox that is
  2567.  in the From: line of the message.  Note that SUBSCRIBE is a synonym
  2568.  for ADD; UNSUBSCRIBE for DELETE.
  2569.  Please note that is IS possible to add or delete someone else's
  2570.  subscription to a mailing list.  This facility is provided so that
  2571.  subscribers may alter their own subscriptions from a new or different
  2572.  computer account. There is therefore some potential for abuse; we
  2573.  have chosen to limit this by mailing a confirmation notification of
  2574.  any addition or deletion to the address added or deleted including a
  2575.  copy of the message which requested the operation.  At least you can
  2576.  find out who's doing it to you.
  2577.  Note that although you would mail submissions to a mailing list by
  2578.  addressing mail to e.g., www-talk@info.cern.ch, in a subscription
  2579.  request you specify the name of the list simply (without the
  2580.  @hostname part) as in the first example above.
  2581.  
  2582.   RETRIEVING DOCUMENTS
  2583.  The SEND command (or the WWW command which is equivalent) returns the
  2584.  document with the given W3 address, subject to certain restrictions.
  2585.  Hypertext documents are formatted to 72 character width, with links
  2586.  numbered. A separate list at the end gives the document-addresses of
  2587.  the related documents.
  2588.  If the document is hypertext, it links will be marked by numbers in
  2589.  brackets, and a list of document addresses by number will be appended
  2590.  to the message. In this way, you can navigate through the web, albeit
  2591.  only at mail speed.
  2592.  If you don't know where to start, try asking for one of
  2593.  
  2594.  
  2595.  http://info.cern.ch./hypertext/DataSources/bySubject/Overview.html
  2596.  http://info.cern.ch./hypertext/DataSources/bySubject/Physics/HEP.html
  2597.  http://info.cern.ch./hypertext/WWW/TheProject.html
  2598.  
  2599.  for lists of futher pointers.
  2600.  
  2601.   CAUTIONARY NOTE
  2602.  As the robot gives potential mail access to a *vast* amount of
  2603.  information, we must emphasise that the service should not be abused.
  2604.  Examples of appropriate use would be:
  2605.  
  2606.       Accessing any information about W3 itself;
  2607.       
  2608.  
  2609. T. Berners-Lee                                                       44
  2610.  
  2611.                                  WWW Server Guide)        14 July 1993
  2612.  
  2613.       Accessing any CERN and/or physics-related or network development
  2614.       related information;
  2615.       
  2616.  Examples of INappropriate use would be:
  2617.  
  2618.       Attempting to retrieve binaries or .tar files or anything more
  2619.       than directory listsings or short ASCCII files from FTP archive
  2620.       sites;
  2621.       
  2622.       Reading internet newsgroups which your site doesn't take;
  2623.       
  2624.       Repeated automatic use;
  2625.       
  2626.  There is currently a 1000 line limit on any returned file. We don't
  2627.  want to overload other people's mail relays or our server. We reserve
  2628.  the right to withdraw the service at any time. We are currently
  2629.  monitoring all use of the server, so your reading will not initially
  2630.  enjoy privacy. End of cautionary note.
  2631.  Enjoy!
  2632.  
  2633.                            The W3 team at CERN  (www-bug@info.cern.ch)
  2634.                                                                       
  2635. Installation
  2636.  
  2637.  Here are the steps necessary to install the Mail Robot product on
  2638.  your unix system.
  2639.  
  2640.   CUSTOMISATION
  2641.  Set up the variables in listserv.h and CommonMakefile to suit your
  2642.  site.
  2643.  
  2644.   POSTMASTER              The address from which messages appear to
  2645.                          come. Why not listserv? Perhaps to prevent
  2646.                          mail loops.
  2647.                          
  2648.   SECUREWWW               The executable W3 line mode browser (v1.3 or
  2649.                          later, so as to have the -listrefs option).
  2650.                          This is a separate product. For security, www
  2651.                          should be writable only by root.
  2652.                          
  2653.   SERVERDIR               The directory in which you want to put your
  2654.                          mailing lists and help about them.
  2655.                          
  2656.   COMPILE THE PROGRAMS
  2657.  Everything compiled on AEM's MicroVax II running ULTRIX 3.0 then
  2658.  TBL's NeXT without any problem at all. Your results may vary.
  2659.  
  2660.   CREATE YOUR SERVDIR
  2661.  wherever you specified in listserv.h. Install a HELP file, perhaps
  2662.  using the example-files/HELP in this directory as a template.
  2663.  
  2664.   SET UP AN ALIAS "LISTSERV"
  2665.  Make an alias in your /etc/aliases (or /etc/sendmail/aliases,
  2666.  
  2667. T. Berners-Lee                                                       45
  2668.  
  2669.                                  WWW Server Guide)        14 July 1993
  2670.  
  2671.  whatever you have) that points to this program, for example:
  2672.  
  2673.  
  2674.                 listserv:       "|/usr/local/mail/listserv"
  2675.                 robot:          "|/usr/local/mail/listserv"
  2676.  
  2677.  
  2678.   FOR EACH MAILING LIST
  2679.  Create a name.info file giving a bit of information about that
  2680.  mailing list. see the *.info files in the example-files subdirectory.
  2681.  Create a name file in the same directory, consisting of email
  2682.  addresses one to a line of subscribers to a group. If it is for a
  2683.  brand-new group, create an empty file. Remember that this file must
  2684.  be writable by the mail daemon. The name of the file is just the name
  2685.  of the group.
  2686.  Depending on how you have your mailing lists set up, you may need to
  2687.  add an alias to the /etc/aliases file for each of the mailing lists.
  2688.  For example:
  2689.  
  2690.         real-recipes: :include:/usr/local/mail/maillists/recipes
  2691.  
  2692.  So sending mail to real-recipes actually goes to each of the
  2693.  subscribers listed in /usr/local/mail/maillists/recipes
  2694.  
  2695.   INSTALL LISTSERV
  2696.  Install in the appropriate directory.  Edit the CommonMakefile and
  2697.  then
  2698.  
  2699.                 make install
  2700.  
  2701.   RUN NEWALIASES
  2702.  This gets sendmail to read the changes in /etc/aliases.
  2703.  
  2704.                 newaliases
  2705.  
  2706.   TRY IT OUT
  2707.  Send mail to listserv with body
  2708.  
  2709.  
  2710.                 HELP
  2711.  
  2712.  for example.  You should get a plain text version of the help file.
  2713.  
  2714. Mail Robot
  2715.  
  2716.  This is a "listserv" type program which maintains mailing lists, and
  2717.  allows W3 documents to be retrieved by electronic mail.
  2718.  
  2719.   Author:                 Various, modified by TBL.
  2720.                          
  2721.   Status:                 Source available  by anonymous FTP. (Oct 92)
  2722.                          
  2723.  
  2724.  
  2725. T. Berners-Lee                                                       46
  2726.  
  2727.                                  WWW Server Guide)        14 July 1993
  2728.  
  2729.   Current version:        1.0
  2730.                          
  2731.   Platforms:              Unix only.
  2732.                          
  2733.   More information:       Overview , Bugs , change history .
  2734.                          
  2735. Bugs
  2736.  
  2737.  This is a list of bugs in or improvements desired in the Mail Robot.
  2738.  See also the list of bug fixes .
  2739.  
  2740.       The INDEX command ought to be implemented, but for some reason
  2741.       always returns an empty list.  Occasionally it seems to work.
  2742.       
  2743. Change History
  2744.  
  2745.  Changes to the Mail Robot , in reverse chronological order:
  2746.  
  2747.   OCTOBER 1992
  2748.  TBL added information retrieval possibility using WWW. Release as an
  2749.  unsupported W3 product to those who ask for it.
  2750.  
  2751.   1991
  2752.  TBL rewrote str.c (used to overwrite its arguments).
  2753.  
  2754.   AEM
  2755.  A. E. Mossberg, aem@mthvax.cs.miami.edu made a couple minor changes,
  2756.  to make it slightly less UCSD-specific. He also added a README, and
  2757.  example files in the subdirectory example-files.
  2758.  
  2759.   ORIGIN
  2760.  Note this is NOT the bitnet LISTSERV program. The term "mail robot"
  2761.  is yused to attempt to prevent confusion between these two products,
  2762.  which have different functionality although they do basically the
  2763.  same sort of thing.
  2764.  This was the UCSD listserv program, which AEM retrieved from ucsd.edu
  2765.  by anonymous ftp, TBL retrieved from ftp.eff.org  As retrieved, from
  2766.  file://ftp.eff.org/pub/listserv2.shar, it consisted of the following
  2767.  files:
  2768.  
  2769.                         README
  2770.                         Makefile
  2771.                         commands.c
  2772.                         listserv.h
  2773.                         main.c
  2774.                         str.c
  2775.                         subscribe.c
  2776.  
  2777.    
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783. T. Berners-Lee                                                       47
  2784.  
  2785.